Is this lite-c or c-script?

Anyway, as long as you are NOT using the 3DGS templates, this (untested) should work...
Code:
function ent_event()
{
   if(event_type == EVENT_SHOOT)
   {
      my.parent = ent_create(...);
   }
   if(event_type == EVENT_CLICK)
   {
      ent_remove(my.parent);
   }
}

function ent_action()
{
   my.event = ent_event;
   [...]
}



Because the entity structure has an entity pointer built-in that is only used by
the c-script templates, dunno about the lite-c templates though.
This pointer is called ENTITY.parent

Hope this helps.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial