Is it possible...

...to have a code which only happens when the current animation is finished?
if(animation_actor.animpos == 5)
{//code;} //that will make the actor execute the action only when the position of the animation is the last (5 in this case)