key_any

This variable takes the value of 1, when any key, mouse or joystick button is pressed, otherwise it is 0.

Range:

0 - not pressed
1 - pressed

Type:

flag, read-only

Example:

action intro_ani
{	
  my.skill1 = 0;
  while((key_any == 0) && (my.skill1 < 100)) // finish animation when a key is pressed
 	{
    ent_animate(me,"frame",my.skill1,0);
 	  my.skill1 += 0.5*time;
 	  wait(1);
 	}	
 	my.skill1 = 0;
 	// ... more instructions
}	

See also:

key_..., on_anykey, key_force, shift_sense, key_lastpressed