• 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.

[Trigger] Send AI Command

Status
Not open for further replies.
Level 4
Joined
Nov 23, 2007
Messages
113
The send AI commend action has 2 parameters: (Command, Data).

I've searched the net and Blizzard files but cannot find a list of constants to be used for the Command param.

Does such a list exist somewhere? Does anyone know the possible set of values for Command and what those commands would be?

Regards
 
Level 4
Joined
Nov 23, 2007
Messages
113
Thanks moyack,

So basically it is a way to send user-defined commands to one's own AI scripts then?

How would I go about intercepting this command in my AI file and access the values I pass from the trigger? That is, if I send AI command ( 100, 40 ), where do I intercept it, and grab the values 100, 40 ?
 
Level 15
Joined
Feb 15, 2006
Messages
851
If you make the AI with JASS AI, you can get them with the commands:

JASS:
native GetLastCommand       takes nothing                               returns integer
native GetLastData          takes nothing                               returns integer

If you do the AI with the AI editor, you can use the commands only to order an attack or an specific unit building/training, with a conditional.
 
Status
Not open for further replies.
Top