just one more dumb dumb question
eboy
Member Posts: 239
ok, I know this is prob. a dumb question but hey I am a dummy.
So I would like to have a button that activates an actor to move up, hold in a rest position a bit and then move back down the same way.
Help...I tried it and it just doesn't work for me...
So I would like to have a button that activates an actor to move up, hold in a rest position a bit and then move back down the same way.
Help...I tried it and it just doesn't work for me...
Comments
Create an attribute: Move Character (boolean)
When attribute: move character is true
Timer: For 1 second: Move UP (speed 100)
Timer: After 2 seconds:
For 1 second
Move Down (speed: 100)
then on the button: When touch is pressed: Change attribute: Move character : true
make sure to keep the speed variables the same if you want the actor in the same position as before, otherwise you can tweak the timers
Also, make sure to reset your attribute: move character to false
You can reset it when the character is moving down
Hope this helps!
When attribute: move character is true/
Is that a CHANGE ATTRIBUTE behavior?
Then you also put a rule in that says: When touch is released, change attribute: game.move character to false
So within the actor (character) itself, you're then creating a rule that says"
Rule: When game.move character is true
Timer: for 1 second
Move: up Speed: 100
You don't need to add anything else other than the above within your actor
When game.move character is: true ( I just type in true, but you can also put in a 1 to indicate true, and a 0 to indicate false if I'm not mistaken, I've just always done it the other way)