noobie question:change action of a key each time its pressed

Game Editor comments and discussion.

noobie question:change action of a key each time its pressed

Postby S0L1Dfake » Wed Jan 03, 2007 5:15 am

How do u change the specific action a button does (key down) each time you do it? For example, this is what I'm trying to do; Have a lot of text displayed but not all at once, one segment at a time, (i.e. a dialogue between 2 characters) Anyway I have an arrow at the bottom of the text and the player can press [down] or the action key to continue and see the next part. Well I have it like this. (text1 is the text actor here)
text1 is displayed
[keydown] : (down) -> [set text] : (text1) "whatever (second part of text)"

but then as you know when the player hits down after this, the second part of the text will just come up again, making it impossible to display the third part of the text. So how do I make hitting that key do something different the first time, then the second time, then the third time, and so on.... ?
User avatar
S0L1Dfake
 
Posts: 15
Joined: Mon Dec 04, 2006 7:31 am
Location: Cleveland, Ohio
Score: 0 Give a positive score

Postby makslane » Wed Jan 03, 2007 1:45 pm

Use a variable to count the key hits.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Troodon » Wed Jan 03, 2007 1:56 pm

....for example by increasing the variable amount every time and creating the texts with different values.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron