Is this lite-c or c-script?
Anyway, as long as you are NOT using the 3DGS templates, this (untested) should work...
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.