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_PUSH) { ent_playsound(my,explode,50); ptr_remove(me); // disappear when hit } } action exploding_barrel_push() { my.push = 3; // only get pushed by entities with push above 3 my.ENABLE_PUSH = ON; // sensible for push collision my.emask |= ENABLE_PUSH; my.event = bounce_event; ... }