EVENT_SONAR

ENABLE_SONAR

Hit by a c_trace instruction with ACTIVATE_SONAR.

Modifies

you - pointer to tracing entity, if any.

Example:

function sonar_event() 
{
  if (event_type == EVENT_SONAR) 
  {
     ent_playsound(my,whamm,50);
     ent_remove(me); // disappear when hit
  }
}

action exploding_barrel_sonar() 
{
  my.ENABLE_SONAR = ON;
  my.emask |= ENABLE_SONAR;
  my.event = sonar_event;
}

See also:

event, c_trace, EVENT_SHOOT