My newb way of making text appear.

Talk about making games.

My newb way of making text appear.

Postby Hyperyon » Fri Jul 28, 2006 2:00 pm

It took me a while to figure out how to easily make pop-up texts for players.
I'll share the method with any other noob like myself:)
Everything revolvs around collision and a count variable.

Before anything, make the texts (I used Adobe Photoshop).
Next, in Game Editor, create 2 actors.Talkingactor and Charactertexts
Add all the text using add animation in the "charatertexts" actor.

On the player you want text to pop up,(talkingactor) add a keydown event, then choose script editor, add a count variable and type the following code (wich Makslane tought me 8) ) regarding the way you want texts to appear.



count++;

if(count == 1)
{
//Create actor "charactertexts" (in 'choose animation', pick the desired text)
}
else if(count == 2)
{
//destroy actor "charactertexts"
}


Now, everytime you push the keydown, "talkingactor's" text (charactertexts actor) should appear.
To avoid that, on the main player, add a collision with the surface of youre platform , add action, event disable, keydown of "talkingactor"

Then add collision with talkingactor, and chosse event enable, keydown.
Now the text will appear after you collide with the talking actor.
You can also disable the main player's keydown events when you collide and avoid popping up the text anytime.

Make an addition in count 2 "else if count==2)//enable mainplayer's key down events" so you can move after the text is over.

Theres one minor flaw. The text appears 1 time. I dont know how to repeat the code. :?

Well,I hope its clear. I appreciate any advice! :D
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby makslane » Fri Jul 28, 2006 2:13 pm

Try reset count in second condition:

Code: Select all
if(count == 2)
{
//destroy actor "charactertexts"
count = 0;
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Hyperyon » Fri Jul 28, 2006 3:13 pm

Its good! Thanks :D
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby relaxis » Fri Jul 28, 2006 8:19 pm

DO LOOP lol
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest