Help Home

Tutorials

Weapon Scr. I
Weapon Scr. II
Missions

Reference

All Commands
General
Load/Add
Graphics
HUD
Sounds
Player
Terrain
Projectiles
Particles
Collision
Objects
AI
Nodes
Missions

Commands: ai

Legend

  • X - X is a number
  • 'X' - X is a string (a letter/word/text)
  • [X=0] - X is an optional parameter with value 0 when omitted (NEVER add [] to your script!)
  • hard sync - command is hard synced

hard sync ai_attack()

Let the current player attack - like hitting space (AI script only)

hard sync ai_backjump()

Let the current player perform a backjump (AI script only)

hard sync ai_down()

Let the current player aim down (AI script only)

hard sync ai_jump()

Let the current player perform a jump (AI script only)

hard sync ai_left()

Move the current player left (AI script only)

hard sync ai_right()

Move the current player right (AI script only)

hard sync ai_settimer(VALUE)

Parameters:
VALUE - timer value from 1 to 10
Let the current player change the weapon timer to VALUE. This is only possible if the currently selected weapon allows it (AI script only)

hard sync ai_up()

Let the current player aim up (AI script only)

hard sync ai_weapon(WEAPON)

Parameters:
WEAPON - name of a weapon
Returns:
SUCCESS - 1 if the weapon is available, else 0
Let the current player switch to WEAPON (AI script only).

The command returns 1 if switching is currently possible and if WEAPON is available.

Attention: Do NOT execute ai_attack in the same script call. Otherwise the player will attack with the old weapon and switching will fail!