• 🏆 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] 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: 13
  • BootyNightelfAI.ai
    4 KB · Views: 15
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