proc_kill (var mode)

proc_kill2 (void* function, ENTITY* ent)

Prematurely terminates other functions instances that are currently in a wait state, filtered by mode or by giving a function pointer and caller entity. This command can be used for terminating certain functions that affect the my or you entity.

Parameters:

mode 1 terminates all functions called by the my entity.
2 terminates all functions called by the you entity.
4 terminates all other instances of the current function (see wait). Must be placed at the begin of the function.  LC 
5 terminates all other instances of the current function that were called by the my entity.  LC 
6 terminates all other instances of the current function that were called by the you entity.  LC 
16 terminates all functions.
ent Entity pointer for terminating only function instances called by that entity, or NULL.  LC  A8.30
function Pointer of the function to terminate, or NULL for terminating all functions called by the entity.  LC  A8.30

Speed:

Medium

Remarks:

Examples (see also vec_lerp):

function beep_any_second()
{
  while(1) { beep(); wait(-1); }
}


function main()
{
  beep_any_second();
  wait(-5);
  proc_kill2(beep_any_second,NULL);
}

See also:

function, wait, proc_status 

► latest version online