Ability CoolDown
markov
Member Posts: 20
Hello!Lets say i want my Player to have a special ability (something like to become a rocket for 2 secs),i finally made it to make the thrust effect on my player and everything looks cool,when im hitting the space button(space=player becomes rocket and fly)my player can fly for 2 seconds.But what i want is that if i ll try to press space again i want this ability to be immune to my control for 5 seconds,and only after 5 seconds he can fly again.Is this possible?
Comments
make an attribute able to fly? bool true
when attribute able to fly is true and touch is press, do something and change attribute able to fly to false
when attribute is false set timer after 5 secs change it to true
Calvin
Still the same,nothing changes,space works every time any thoughts?
so when attribute is false put it in the timer and set for after 5 secs change to true
http://imageshack.us/photo/my-images/5/43404609.png/
Calvin
I WAS MAKING A COOLDOWN IN MY PROJECT THIS IS WHAT I DID TO GET IT TO WORK
You do this
Rule:
receives a key press space is down
do:
spawn actor astroid in front of actor
change attribute set spawn cooldown to false
timer after 3 seconds run to completion
change attribute set spawn cooldown to true