ID:165926
 
Hi, how would the code look if I wanted to have it so if I bump into a person or dummy I message pops up and it has text in it like in the pokemon gba games?

Ronaldinho0412 wrote:
Hi, how would the code look if I wanted to have it so if I bump into a person or dummy I message pops up and it has text in it like in the pokemon gba games?

While i do not know how to do it when the person bumps into the NPC, or how to make it look like the text in the pokemon games, I do know that you can make a text box pop up.
verb/talk
alert("How are you today?","Dialog","Ok")

The "How are you today?" will be displayed inside the box. The "Dialog" will be inside the box's top bar. You can chamge that to what ever you want. For example you could have a danger sign with a box pop up and....

Danger
This is a restricted area
|Ok|
Just as an example, or you could put{""} to have nothing displayed like this....

_____________
This is a restricted area
|Ok|


As for the bumping into the NPC to talk, try looking up the Bump() command. Hope this helps :P
In response to FriesOfDoom
Thanks!

that helped sorry I forgot to put the pic up it shoudl look something like this http://pokedream.com/games/rubysapph/walkthrough/steven.png
In response to FriesOfDoom
Also is there a way I can have a message pop up saying what is yoor name? Then I could have a plce to type you name in ?

Thanks!
In response to Ronaldinho0412
Ronaldinho0412 wrote:
Also is there a way I can have a message pop up saying what is yoor name? Then I could have a plce to type you name in ?

Thanks!

No problem :P I love to help.
Login()
var/p=input("What do you want your name to be?")
usr.name=p

If you want to test if it works, here is an easy way.
mob
verb
See_Name()
usr<<"Your name is [usr.name]"


Normally the player is given a name depending on their Byond key. So before choosing my name, my name would be FriesOfDoom. So when doing the saves coding and that type of thing, you want to use [usr.key] NOT [usr.name].

Now as for the name in the message you can do...
mob/verb/say(msg as text)
view()<<"[usr] says [msg]"

Or to make it simpler to read to the player
mob/verb/say(msg as text)
view()<<"font color=blue>[usr] says:</font> [msg]"

Giving the "<font color=blue>FriesOfDoom says:</font> Hi" a blue color

edit*
oh and for the message coming up with your/other's names...
Click()
usr<< "<b> <font color=blue> Name: [name]</font>"

The above code will cause in the the mob clicked on name to be displayed in the text browser.

If you know anything about HTML than you'll notice that I did not close the bold command (). Normally this would cause everything after it to be bold. But since this message ends after a wanted point, there's no worries.

I'm sorry I can't help you with making it look like in the pokemon games, I'm trying to learn that myself. But if you add me to your MSN Messanger, I can tell you when I find out :P([email protected])
In response to FriesOfDoom
To the topic owner:

READ THE DM GUIDE. It will tell you everything you need to know to do this.
Ronaldinho0412 wrote:
Hi, how would the code look if I wanted to have it so if I bump into a person or dummy I message pops up and it has text in it like in the pokemon gba games?

There is no built-in function to do this. Your best bet would be to use something like hub://Shadowdarke.sd_Text to generate the text on the map.