i am having a bit of a problem with enable/event shoot. here is the script:

function destroy_enemy()
{
effect(destroy_e, 100, my.x, nullvector);
kills += 1;
ent_remove(me);
}

action entity_to_be_destroyed()
...
my.emask |= ENABLE_SHOOT;
my.event = destroy_enemy;
...


when the entity has been 'shot' it runs the entity's event twice, producing an error. how do i only run the event once?
thanks


One day there will be an unfixable bug,
That day is not today.