Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Newb-friendly Global/Map Messages


Carim123
 Share

Recommended Posts

Anyway, I'm not alone in this, but I constantly forget to put the ' when I want to type a Global Message. So I simply changed it so that rather than that, it's an pretty much in-your-face option, that you can't miss.

The end result is something like this:

>! [![](http://www.freemmorpgmaker.com/files/imagehost/pics/08485faaaf9bfaa15a000f6e64b07238.png)](http://www.freemmorpgmaker.com/files/imagehost/#08485faaaf9bfaa15a000f6e64b07238.png)

This is a simple little change. It gets rid of the ' command, because I often forget to put it in place, before the message, and replaces it with two option buttons, "Map", and "Global"
Like I said, this is simple, aimed at beginner users. I know I'm definitely not the best of programmers, but I feel like I need to contribute. Hope this helps new users. :D

* * *

So, to start, open VB6, and open up frmMain, and make a Picture, or Frame. Place it anywhere you like, preferably in Options, or next to your txtMyChat.

Inside the Frame, or Picture, add two option buttons, name one "optMap", with the Caption "Map".
Name the other "optGlo", with the Caption "Global". Easy to follow, right? xD.

Now, look for:
```
        ' Say message
        If Len(ChatText) > 0 Then
            Call SayMsg(ChatText)
        End If
```
Get rid of that, and replace it with:
```
  ' Say message
        If Len(ChatText) > 0 Then
            If frmMain.optGlo.Value = True Then
                Call BroadcastMsg(ChatText)
                    End If
            If frmMain.optMap.Value = True Then
                Call SayMsg(ChatText)
                    End If
        End If

```
Now, if you compile it, you can switch it without the need for putting "'", and any newbies to your game can figure out what they do. Make sure you test it, and adjust it to your liking.

The problem, is that at the moment, you can have Map selected, start your message with "'", and still be Global. So we need to do one more thing…

Now, look for:
```
' Broadcast message
        If Left$(ChatText, 1) = "'" Then
            ChatText = Mid$(ChatText, 2, Len(ChatText) - 1)

            If Len(ChatText) > 0 Then
                Call BroadcastMsg(ChatText)
            End If

            MyText = vbNullString
            frmMain.txtMyChat.text = vbNullString
            Exit Sub
        End If
```And simply remove it. Now, you'll find you can start your messages with "'", and it won't go over the Map chat.

* * *

Have fun actually remembering to do Global, now. :D
Link to comment
Share on other sites

@Gin-ji:

> Thanks for the tut- but, does that happen to be a pokemon game, the tiles look like pokemon.

Thanks. Hope you find a good use for it :D

No, it isn't a Pokémon Game, I just find the tiles easy to map with, plus, when I get around to it, I'm going to simply draw over them.
Link to comment
Share on other sites

@Damian666:

> or you make a dropdown, with all chat options like i did in stable, that works nice too :)

Yeah, I was, but it looked clunky, and didn't fit very well with my GUI. It still doesn't, but this looks better than before. xD. Thanks, anyway.

EDIT: Come to think of it, I completely forgot Emote messages. :crud:
@Gin-ji:

> Before you do that would you mind sending me a copy of them?

Not really. If you want Pokémon resources, go around Google, like I did, and compile them yourself. I don't want to waste my time with uploading about 14 tilesets now.
Link to comment
Share on other sites

Heh, yea I wanted to do something like that too.

I think this is the best way to do it, maybe I'll go and add a keyboard button switch for it too, besides being able changing it by mouse.

Thanks man.
-=-=-

Besides, how did you make the Chat transparent, I remember trying that quite a while ago.. But couldn't figure it out.

Edit:
http://www.touchofdeathforums.com/smf/index.php/topic,72039.0.html
I guess what Akio posted will work.
I can't try now though as I'm doing exams. Will try it after them though. heh
Link to comment
Share on other sites

@janpan40:

> Pokemon Sucks, im sorry du
> What is with you and pokemon?????
> Im sorry dude but grow up, pokemon sucks!

Shaddup.
Your opinion is your own. Your opinion is not a law. Pokémon may have cute characters, but it's one of the more better Strategy RPGs. Get off of my thread if you're going to waffle, and start forcing your own opinion.![](http://gannon-banned.com/images/site_images/gannon_banned_images/posting.jpg)

@adr990:

> I think this is the best way to do it, maybe I'll go and add a keyboard button switch for it too, besides being able changing it by mouse.

It's better with an Option, or Combo Box. The point of this tutorial was to help the more forgetful members, and adding a keyboard combo isn't going to help that.

> Besides, how did you make the Chat transparent, I remember trying that quite a while ago.. But couldn't figure it out.
>
> Edit:
> http://www.touchofdeathforums.com/smf/index.php/topic,72039.0.html
> I guess what Akio posted will work.
> I can't try now though as I'm doing exams. Will try it after them though. heh

It isn't transparent. I used Captain Wabbit's (Is it Wabbit?) drawn to screen tutorial, combined with Lightning's Text issue fix. Akio's post doesn't actually make the Chatbox translucent over the picScreen, just so you know.
Link to comment
Share on other sites

@QWERTYUIoP:

> Shaddup.
> Your opinion is your own. Your opinion is not a law. Pokémon may have cute characters, but it's one of the more better Strategy RPGs.

fucking amen, stupid fucks that get distracted by the cuteness, its a real good game, mechanics go really deep.

sorry, ill not hiyack your thread anymore xd

Dami
Link to comment
Share on other sites

@Greendude120:

> I agree with Damian, you should probably make a part of this tutorial that lets you use a dropdown instead of those box checks. It would give more options. Personally i find the drop down better for my GUI.
>
> Good work on the tut!

Yeah, I'll update it. I need to add Emote messages, anyway.
Link to comment
Share on other sites

I meant just one button on the Keyboard like: TAB to switch the checkbox, btw. :)

And thanks for pointing out about the transparency of the chatbox. Really gonna save some screen space, and make the GUI look better.
Link to comment
Share on other sites

  • 2 months later...
I know this topic is old, but I'm really stumped. I've been trying to teach myself VB6, but I can't figure this out: I make a frame, and the two selection things on the inside, and everything works, but it just doesnt say Global and Map. I changed the captions to that, but it doesnt show them. I tried changing the text color, and resized the frame, but it doesnt show the caption :/ help please
Link to comment
Share on other sites

  • 2 months later...
It's not a matter of being the best coder, it's a matter of actually reading the thing properly. >_>

If you want to stick to this, simply set the global (or map)'s value under property to true.
Also, to save, create a new option under OptionRec, use GetVar and PutVar under the LoadOptions and SaveOptions (It honestly isn't tricky to figure out.), and that's all there is to it.

Now, re-read the thing, and see why I posted that tutorial to use.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...