The problem is how to determine the action of the entity. The only way to have a control over it without adding superfluous stuff like assigning (by yourself) numbers for action indication is assigning a function to the my.event of an event and setting ENABLE_FRAME.

This way you can duplicate the entity easily:

Code:
ENTITY* createEntity (char* filename, VECTOR* position, void* fnc)
{
   ENTITY* ent = ent_create(filename, position, NULL);

   ent->emask |= ENABLE_FRAME;
   ent->event = fnc;

   return(ent);
}

ENTITY* duplicate (ENTITY* src)
{
   // Duplicate model
   ENTITY* clone = ent_create(src->type, src->x, NULL);

   // Assign event function
   clone->event = src->event;
   clone->emask |= ENABLE_FRAME;
   
   // Copy attributes
   {
      vec_set(clone->pan, src->pan); // Orientation
      vec_set(clone->scale_x, src->scale_x); // Scale
      //... and the rest
   }
   
   return(clone);
}



This way, you can't work with wait(1) but this is a low price for this neat and self-build feature!