Change attribute doesn't wait for a timer
I got a question about a weird behaviour of my codes which I don't understand. Even though I got a way for my code to work, it just makes no sens to me so I'd love a bit of clarification.
I got a collision rule, and inside it I got a wait after 3 second timer rule. When I put my change attribute inside that timer rule, it is executed before the 3 second timer is done and instead suddenly.
This is actually what I'm trying to do, however it makes more sens to me to put it inside the collision rule but outside of the timer rule, but when I do it is never executed.
Here's a screenshot:
http://imageshack.us/photo/my-images/97/capturedcran20110527052.png/
How do I get another action to work before starting a timer rule?
Btw sorry if I'm spamming the forum with questions, I will probably moderate when I get the hang on GameSalad
I got a collision rule, and inside it I got a wait after 3 second timer rule. When I put my change attribute inside that timer rule, it is executed before the 3 second timer is done and instead suddenly.
This is actually what I'm trying to do, however it makes more sens to me to put it inside the collision rule but outside of the timer rule, but when I do it is never executed.
Here's a screenshot:
http://imageshack.us/photo/my-images/97/capturedcran20110527052.png/
How do I get another action to work before starting a timer rule?
Btw sorry if I'm spamming the forum with questions, I will probably moderate when I get the hang on GameSalad
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Comments
I'd like to have an imput on this since this behaviour seem a bit weird to me and unless I've made an obvious mistake there's something I don't understand.
When actor collides, interpolate self.attribute to 1 over 3 seconds.
RULE when self.attribute = 1 Change attribute behaviors and whatever else you want.
Interpolate is one of the best behaviors in GS and Timers are a little processor heavy at this time.
Go with the interpolate to work-around this and save you some processor power! :-)
Good luck!