• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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