A custom Animation's specific frame needs to trigger another object to appear

Started by Olleh19, Mon 27/01/2020 00:45:04

Previous topic - Next topic

Olleh19

I'm not sure the subject description is understandable enough.
Let's say i have a custom animation with 70 frames, and at frame 60 it needs to trigger another object or animation of another character/object (i'm not sure yet, depends how much effort i wanna put into this).

How would i do that in script?

Thanks!


Crimson Wizard

Something like this:

Code: ags

function repeatedly_execute()
{
    if (oObject1.Animating && oObject1.View == MY_VIEW && oObject1.Loop == MY_LOOP && oObject1.Frame == 60) {
         // Trigger action
    }
}


In room script you would replace "repeatedly_execute" with corresponding room's event handler.

Olleh19

Ahh! Yes ofc! I remember now, that .animating syntax, i forgot that, thank god for the beginner technical questions! (laugh) 
Thanks Crimson!

SMF spam blocked by CleanTalk