I have a character who shoots and I want a certain entity enemy that I made to dissapear when I shoot him, I don't know what code to use for this, does anyone here know ? Just that the enemy dissapears not to be seen. and if possible a code that he will dissapear after maybe 3 or 4 seconds thank you
put this in the function that is called when the entity is shot
function get_shot {
if(event_type==event_impact) // entity was hit by a bullet { sleep(4); //wait 4 seconds my.invisible=on; //turn invisible my.passable=on; //turn passable
}
}
//////////////////
action get_shot_ent // this is the enemy to be shot {
my.enable_entity=on; //make the enemy sensible to getting hit with c_move my.event=get_shot; // run this function when hit
}
You're not as unique as you think you are, try again.