Trigger Action Based on Certain Animation Frame? [SOLVED]

Started by Skeller53, Sun 30/01/2005 04:20:48

Previous topic - Next topic

Skeller53

Is there a way to trigger an action based upon a specific frame in an object's animation? For example, if you want to trigger a collision between object A and object B, but you only want it to occur/be detected on the third frame of object A's animation, is there a way to do that?

As always, many thanks for any help.

Proskrito

i think you can't get the cuerrent frame of an object, but you can get the sprite number, so you could write down the sprite number of that frame, lets say its X, and write:
if (GetObjectGraphic(objA)==X && AreObjectsColliding(objA,objB)) {
do something;
}

Skeller53

Perfect! Just what I wanted. Thank you so much.

Don't know how I missed that in the object function list. Of the many services this board provides, one is to get novices like me to approach problems from different angles. It's great.

SMF spam blocked by CleanTalk