• 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 for guards?

Status
Not open for further replies.
Level 3
Joined
Oct 30, 2005
Messages
51
Hi all. I was just wondering if it was possible to make AI for a specific bunch of units. For example, in my map, a hero can hire 4 body guards. The guards follow him around, defend him and retreat as and when they need to. But the guards arent supposed to be controlled by the player who bought them. Kinda like guards who think by themselves. Is it possible :?:
 
Level 3
Joined
Jul 23, 2004
Messages
58
You can make this easier by triggering.

Player buys a Bodyguard -> Trigger - Enable GuardTrigger -> Remove buying Unit from game -> Create 1 Bodyguard for player 12 -> Treat Player 12 Ally with Owner of buying Unit -> Add last created Unit to UnitGroup Guards

GuardTrigger: PeriodicTime - Every 5 seconds -> UnitGroup - pick every unit in Guards and order picked unit to follow heroP1

Just a suggestion... Not a real solution for an ai but still something.
 
Status
Not open for further replies.
Top