attributes inside timer expression not updating in real time
nulo
Member Posts: 315
example:
timer
every [ 2*game.attributeX ]
do something
what happens is when the actor with this timer expression is spawned it looks and sees whats the value of "game.attributeX" and saves this in memory, and only uses this value for "game.attibuteX" inside the timer, even if you change this value after the spawn.
this way if on the time of spawn "game.attributeX" = 2 it will keep using 2 even if, 2 seconds after the spawn, I change the value of "game.attributeX" to 4, or any other number.
***this seems to be a issue with the timer expression, because if at the same time I use this same attribute somewhere else, for example, a move behavior, it works correctly.
help from the gendai folks?
timer
every [ 2*game.attributeX ]
do something
what happens is when the actor with this timer expression is spawned it looks and sees whats the value of "game.attributeX" and saves this in memory, and only uses this value for "game.attibuteX" inside the timer, even if you change this value after the spawn.
this way if on the time of spawn "game.attributeX" = 2 it will keep using 2 even if, 2 seconds after the spawn, I change the value of "game.attributeX" to 4, or any other number.
***this seems to be a issue with the timer expression, because if at the same time I use this same attribute somewhere else, for example, a move behavior, it works correctly.
help from the gendai folks?
Comments
http://gamesalad.com/game/play/59180
Here is how it can be done:
http://gamesalad.com/wiki/how_tos:gsc_variable_timer_speed