Page 1 of 1

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

PostPosted: Wed Jan 03, 2007 5:15 am
by S0L1Dfake
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.... ?

PostPosted: Wed Jan 03, 2007 1:45 pm
by makslane
Use a variable to count the key hits.

PostPosted: Wed Jan 03, 2007 1:56 pm
by Troodon
....for example by increasing the variable amount every time and creating the texts with different values.