• 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] Attack-Move AI Trigger

Status
Not open for further replies.
Level 2
Joined
Oct 10, 2007
Messages
12
It seems like every time I set up my AI attacks, the units will just move about a screen away and then just go back to their spawn before they really get anywhere. They are supposed to keep going at least until they reach a player's start location, and preferably attack any player units there.

Here is what I'm doing for the spawning...

  • HstleAtk 2 wolf Spawn
    • Events
      • Time - Every 45.00 seconds of game time
    • Conditions
      • (Number of units in Nature_AI) Less than or equal to 0
    • Actions
      • Game - Display to (All players) the text: Debug: SPWN_Hostile...
      • Unit - Create 1 Alpha Wolf for Neutral Hostile at (Center of Wolf Spawn <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Nature_AI
      • Unit - Create 1 Adult Wolf for Neutral Hostile at (Center of Wolf Spawn <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Nature_AI
      • Unit - Create 1 Young Wolf for Neutral Hostile at (Center of Wolf Spawn <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Nature_AI
and for the attack...

  • HstleAtk 2 wolf Attack
    • Events
      • Time - Every 45.00 seconds of game time
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: Debug: ATK_Hostile ...
      • Unit Group - Order Nature_AI to Attack-Move To ((Random player from (All players)) start location)

I should also add that some of the players won't be spawning every game, and I'm not sure if that affects the start locations or not. (like, the ability to move to the position of start locations)

So, what am I doing wrong? Any takers?
 
Level 4
Joined
May 16, 2004
Messages
76
I might have a random stab in the dark here. Is it possible because its neutral hostile they are like creeps? Therefore in meelee games creeps run back to their spot after a while. I dunno thats just my thoughts.
 
Level 2
Joined
Oct 21, 2005
Messages
12
Ill take a bit of a shot, first question, maybe im just not looking at it from the right angle but your condition, "Number of units~~~~ less than or equal to 0" is it just me or does that mean for the script to execute it needs negative amounts of creeps? Also to note, im pretty sure start locations are removed for players that arent in the game.
 
Level 2
Joined
Nov 19, 2007
Messages
8
That could very-well be. Try assigning them to an unused Player and set Player Properties in the editor to "Computer."
It seems that Neutral/Neutral-Hostile units tend not to use abilities, either.
(A set of Nerubian Webspinners wouldn't start casting raise-dead until I gave them Computer control in the Players menu)
 
Status
Not open for further replies.
Top