you | Pointer to the collider entity |
normal | Normal vector of the hit surface |
bounce | Vector in ricochet direction |
function bounce_event() { if (event_type == EVENT_IMPACT) { ent_playsound(my,explode,50); ent_remove(me); // disappear when hit } } action exploding_barrel() { my.ENABLE_IMPACT = ON; // sensible for push collision my.emask |= ENABLE_IMPACT; my.event = bounce_event; ... }