• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[AI] AI Trigger Actions Explained

Status
Not open for further replies.
Level 6
Joined
Jun 16, 2004
Messages
237
AI - Start Melee AI Script
Starts an AI script for a computer player with a special behavior of defending allied players.

AI - Start Campaign AI Script
Starts an AI script for a computer player without special features.

AI - Send AI Command
Sends two integers to the AI script from the map script. This is one of the few ways to pass information from a map script to the AI script. In the AI Script, you can use GetLastCommand() and GetLastData() to get the integers.

AI - Ignore Unit Guard Position
Contrary to what the name suggests, this command prevents the AI from using the unit in the attack group. The command does not clear the guard position, and hence it does not allow the unit to join the defense group. Instead, the unit will stay in its guard position until it dies. The unit will not be replaced by new units.
Does not affect workers, heroes, or units in the attack group.

AI - Ignore All Unit Guard Positions
The same as above but affects all units of a player, excluding workers, heroes, and units in the attack group.

AI - Recycle Unit Guard Position
Clears the unit's guard position and orders it to join the defense group. Also removes the effect of AI - Ignore Unit Guard Position and allows the unit to be assigned to the attack group. New units will not be sent to the unit's guard position.

AI - Lock Unit Guard Position
Has no effect. (I couldn't find any in my tests.)

If you have more information on the behavior of these commands, feel free to post.

Cheers!
 
Level 2
Joined
Jul 19, 2004
Messages
13
Patrolling units -
if you want units to patrol in a map using triggers, it seems you have to use the 'ignore guard position' actions, at least, i think, that's if you want them o return to their patrol after surviving an attack
 
Level 2
Joined
Sep 4, 2004
Messages
30
special behavior of defending allied players.
I think (like blizz describes in the ai ed) its not defending (there is a boolean for that), its more like working together - means it tries to follow you if it sees that u start a "mega attack", even its units dont return home when its heroes are killed, they stay with u if they see a chance to win together. Sometimes u see that 1 or 2 of its units are in your assaultgroup instead of its.
 
Status
Not open for further replies.
Top