Take Actions while on an animation (SOLVED)

I wanna know if its possible to make some adjustments in a exactly frame of an animation.
Example:

My animation have 15 frames and when it hits frame 5 I wanna enable a colliderobject and on hit frame 10 i wanna disable it.

If its not possible, what would you sugest to make something similitar like that.

Thanks very much.

another question: how can I change the positon of a sphere inside a collisionobject? I am trying go.set_position(vmath.vector3(-80,2,0), “/bat1#collisionobject#sphere”) without sucess

I got all my answers on the slack group, thanks to pkeod.

#1 question:

the only way to do that is to manually animate the object by having multiple sprites as frames which you swap between over time.You can also activate / deactivate sprites over time for same thing if you need to have correct position of sprites

#2 question

you cannot do this at this time, but you can use sub game objects parented to the main game object with a single collision object to use as moveable detectors relative to the main game object parent

1 Like

There is no automatic method but you can use a timer, either program one that counts frames or animate a dummy script property for 15x0.01666 seconds. See Delay functions?

1 Like

Would it also be a solution to split the animation into 2 different ones?

Play first, and on animation end, start second one and activate collision/whatever?

1 Like

Absolutely. That is a good option.