GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help changing an attribute for a specific amount of time.

In my game, when the device is tilted a certain amount, I want to change an attribute named "carve" to true for 1 second and then back to false.
However, even using a timer, the attribute stays true indefinitely.
Here's my code:
If accelerometer.y > 0.6
Then
For 1 second (run to completion)
set: game.carve to true

set: game.carve to false (outside of timer).

Any help would be appreciated.

Comments

  • trevorkbondtrevorkbond Posts: 6Member

    The problem is I only want to have to tilt the device for a split second, but for the attribute to change for the full second, the device has to be tilted for the entire second.

  • SocksSocks London, UK.Posts: 12,821Member

    If accelerometer.y > 0.6
    --change game.carve to true
    --Timer After 1 second (run to completion)
    ----change game.carve to false

Sign In or Register to comment.