use a skill (or flag) of the bullet to check if its alive or not.
In the event function set this skill (or flag) to "dead". Furthermore you use this skill (or flag) as condition for the while loop of it, which is then skipped when the bullet is "dead" and after the while loop you remove the bullet.
lite-C Example using a skill:
#define health skill1
function bullet_event()
{
if(event_type == EVENT_BLOCK || event_type == EVENT_ENTITY)
{
my.health = 0;
}
}
action bullet_act()
{
my.health = 1;
while(my.health)
{
// do the c_move stuff in here
}
wait(1);
ent_remove(me);
}
note: Not tested code!