• 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] Make AI defend another AI ally

Status
Not open for further replies.
Level 6
Joined
Dec 11, 2014
Messages
93
Hiya all, I was wondering if there was a way for me to make one of my AI defend the player (or another AI) that is allied to them. I have DefendUser set to true but they don't actually defend each other for some reason, and I'm not sure how else to make them properly defend each other. If anyone has any ideas on how I can make this work within the script or even with triggers I'd really appreciate it, thanks!

Attached are the two AI scripts. It's the Human AI that I want to help defend the Nightelf AI if they are attacked. Other than the defending, they are pretty simple AIs.
 

Attachments

  • BootyHumanAI.ai
    4.2 KB · Views: 15
  • BootyNightelfAI.ai
    4 KB · Views: 17
Level 6
Joined
Dec 11, 2014
Messages
93
~~Bump~~ Still wondering if someone can help me with having AI's defend each other if they are on a team.

Does this need to be done in triggers perhaps or is there a function I can put into my AI itself to do it?

I know there is "SetDefendPlayer(true)" but it wasn't working when I wanted my AI to defend his allies. Any tips on this would be appreciated.
 
Status
Not open for further replies.
Top