EVENT_PUSH

ENABLE_PUSH

Run over by another entity with a higher push or same group parameter.

Modifies:

you Pointer to the collider entity
normal Normal vector of the hit surface
bounce

Vector in ricochet direction

Example:

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;
  ...
}

See also:

event, c_move, push, group, EVENT_IMPACT

► latest version online