your

you

Pointer to a second entity. Is preserved in functions during wait(), but modified by many functions. At the start of an entity function, you is the pointer to the creating entity (if any), otherwise NULL.

Type:

ENTITY*

Modified by:

c_trace, c_scan, c_move, ent_create and many other functions .

Example:

function bullet_fly()
{
  my.pan = your.pan; // get the same direction as the creating entity
  while(1)
  {
    c_move(me,vector(30*time_step,0,0),NULL,IGNORE_YOU); // ignore the creating entity
    wait(1);  
  }
}

...
ent_create("bullet.mdl",my.x,bullet_fly);
...

See also:

Entity, my, ent_create, c_trace, c_scan 

► latest version online