i tried this
[code:45guzdhm]- if key F1 pressed, set variable to 1-variable (set the variable to 1-itself)
-- if variable = 0, set position to .x+150
-- if variable = 1, set position to .x-150[/code:45guzdhm]
and its not working. well, more propable i just implemented it wrong.
But i dont understand, so whenever i press F1 the variable will be changed to 1
so how the second sub-event gone trigger?
what have i done wrong?
EDIT oh sorry guys, i havent seen your posts before. lemme check your info and see if it works
okey i have tried this:
IF key F1 pressed=>
If variable =0 :
1. move Object verticaly 150
2. Set variable to 1
1. move Object verticaly -150
2. Set variable to 0[/quote:45guzdhm]
and it works almost
right. the problems shows when i press the F1 rapidly. then it offten move twice down and one up or the opposite. ill try and add "every 500milisec" as condition to F1 key pressed and see how itll work.
nope. it fixed one problem adding another one. now - yes, the event cant be triggered twice or more in row with the same moving values but also, because of the times it now works just half of the time lol so every 1/4 F1 hit acutlay works, then again when i decrese the times to the point when it works 100% of the time, the event overlaping stricks back.
WOHOW! ive found an solution. its anything but elegant but it works!
heres the deal:
i needed to add timer and a new variable, and it didnt worked at first. but when i changed the timer for 1000milisecs now its all good.
thankc guys for support and stimulating my brain cells