I'd like to know if I'm using the Timer variable right. I'm trying to use it as a countdown so that when it reaches zero then events will be triggered. I'm not sure if that's exactly how it works or is meant to be used but I'm looking for something which will do that job.
I've given something like this a try but it doesn't seem to work
(Pre Main Loop variable set)
Timer=50
(In Main Loop)
Rem countdown activate
Timer=Timer-1
If Timer<=0
do stuff
Rem Reset timer
Timer=50
End If
I don't know if it just doesn't work, my syntax is wrong or it does work but my perception of the timer going down just misses it because it's so fast but I tried it with larger numbers and get the same thing.
Also is there a way to reference an animation end in Amal or otherwise? Such as (Pseudocode)-
- If/When animation reaches last frame in a sequence then do something
- If/When animation is on a certain frame in a sequence then do something
Obviously it'd have to reference the frame in the animation sequence and not just the sprite bank image number as there could be the same image twice in the animation sequence to give a movement effect.
If it's possible all this would be mega handy to know as branching off and triggering other things while animations are happening by way of timers or frame referencing would make the game so much easier to handle as half the time I feel I know what needs to be done and how to do it but I've no idea how to actually reference that part I want to target.
Thanks!