Change attribute doesn't wait for a timer

kapserkapser Member Posts: 458
edited November -1 in Working with GS (Mac)
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 :)

Comments

  • kapserkapser Member Posts: 458
    Bump.

    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.
  • DrGlickertDrGlickert Member Posts: 1,135
    I'd use interpolate as a timer. Timer's are a bit finicky and they are difficult to figure out. If you search for "Interpolate as a timer" in the creator I posted a template on how to use interpolate as a timer...(hence the name of the project...) :-)
  • kapserkapser Member Posts: 458
    Interresting, I will try that thanks!
  • DrGlickertDrGlickert Member Posts: 1,135
    I'd use a self.attribute call it whatever you want, make it an integer or real.

    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!
  • kapserkapser Member Posts: 458
    Thanks a lot, I'll try that. Interpolate is extremely usefull. Didn't think it would drain less processor juice than timers either.
Sign In or Register to comment.