Help changing an attribute for a specific amount of time.
trevorkbond
Member Posts: 6
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
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.
If accelerometer.y > 0.6
--change game.carve to true
--Timer After 1 second (run to completion)
----change game.carve to false