• 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.

AOS Spawn bug

Status
Not open for further replies.
Level 4
Joined
Aug 20, 2004
Messages
65
I have a problem with spawned units in my Aos. After they're first spawned they rush off to fight like they're supposed to. After the two waves meet and fight, the survivors will turn around for some reason, and run back to base. Here are my triggers (I basically copied them from Thehelper.com's DotA template, and removed the memory leaks).

  • Spawn Sentinel
    • Events
      • Time - Every 45.00 seconds of game time
    • Conditions
    • Actions
      • -------- SPAWN NORTH --------
      • Set Temp_Point = (Center of TopHumSpawn <gen>)
      • If ((Ancient of War 0040 <gen> is alive) Equal to True) then do (Unit - Create 3 Footman for Player 1 (Red) at Temp_Point facing 90.00 degrees) else do (Unit - Create 4 Footman for Player 1 (Red) at Temp_Point facing 90.00 degrees)
      • If ((Voodoo Lounge 0110 <gen> is alive) Equal to True) then do (Unit - Create 1 Spell Breaker for Player 1 (Red) at Temp_Point facing 45.00 degrees) else do (Unit - Create 2 Spell Breaker for Player 1 (Red) at Temp_Point facing 45.00 degrees)
      • Custom script: call RemoveLocation (udg_Temp_Point)
And here's the move trigger.

  • Move North Sentinel
    • Events
      • Unit - A unit enters TopHumSpawn <gen>
      • Unit - A unit enters TopHumanCast <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Set Temp_Point = (Position of Director 0100 <gen>)
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)
Then this one.

  • Redirect3
    • Events
      • Unit - A unit comes within 500.00 of Director 0100 <gen>
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Player 1 (Red)) or (((Owner of (Triggering unit)) Equal to Player 7 (Green)) or ((Owner of (Triggering unit)) Equal to Neutral Hostile))
    • Actions
      • Set Temp_Point = (Position of Arcane Vault 0000 <gen>)
      • Set Temp_Point2 = (Position of Director 0118 <gen>)
      • If (((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to True) then do (Unit - Order (Triggering unit) to Attack-Move To Temp_Point) else do (Unit - Order (Triggering unit) to Attack-Move To Temp_Point2)
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Custom script: call RemoveLocation (udg_Temp_Point2)
My terrain is in no way hard to navigate; it's a stright path from one base to another, with no rocks or trees in the road. My units are not controlled by neutral creeps (although I do know how to get past that). Also, they only turn around AFTER they encounter an enemy group and have fought with it. Then they turn back.
 
Level 7
Joined
Mar 12, 2006
Messages
407
In Object Editor there is a flag for each unit that allows them to run away or not
I dont know the word since my WE is in german
Try to disable it

I made an AOS once and I didn't disable AI
If you want your units to cast and stuff you should leave the units AI enabled
I had no problems with my units movement

I used regions and ordered units to move to random points in those regions
My map was 128 x 128 with 3 teams, 3 lanes each and had like 4 regions to control units movement
 
Level 4
Joined
Aug 20, 2004
Messages
65
Well, I made all of them unable to flee and they still run away, sometimes with full life. Units with no mana do it to, so they can't be trying to regain their energy. About the redirectors, I use invisable units instede of regions, using the 'unit comes within range" trigger (does that make a memory leak?). I have one per lane in the very middle. Do you think more would help? Because sometimes they turn around right after the the redirector sends them forwards (I made sure it was sending them in the right direction, too).
 
Level 7
Joined
Mar 12, 2006
Messages
407
Did you ever try to use regions ?
Just deactivate your trigger using that redirector unit and write a new one using regions... should be done fast and maybe it works then

I can see no reason why your units run away and the only thing that differs your system from mine is that unit within range event so it might help to change that
 
I think i might know a way to kind of stop the problem, its using the built in Wc3 aqusition range for each unit, so when they kill the unit, or it exists their range they run back, i believe that this is happening to your units, try ordering them to stop before making them advanced, but to give you a more in dept response id have to see it.

Also is like a ToB AoS or a Battleship AoS? I tried to make a Bship AoS and i messed up with one of the attack items so it hit allied units as well, and when it hit them it make them run back to the start.

Im also more familiar with regions (rects if your using WeU), so i might not be able to help you fully.
 
Level 4
Joined
Aug 20, 2004
Messages
65
Switched it to a bunch of triggers like this for the movements + redirect.

  • Top Human Move1
    • Events
      • Unit - A unit enters TopHumSpawn <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Set Temp_Point = (Center of TopMove1 <gen>)
      • Unit - Order (Triggering unit) to Attack-Move To Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)
They still ran away when they had destroyed the enemy wave.

I also tried the aquisition range. When i set it to zero it had no effect, and the units ran back. When I made it higher, the units left their lanes to attack enemies in the other ones.
 
Level 7
Joined
Mar 12, 2006
Messages
407
Ok... i found my aos map and looked my system up

My center region was triggered like this:

Event:
Unit enters region -middle-
Condition:
Unit owned by player ...
Action:
Wait 10 seconds
Order triggering unit to attack/move to -middle-
Wait 10 seconds
Order triggering unit to attack/move to -middle-
Wait 10 seconds
Order triggering unit to attack/move to -final target-

so waypoints were:
Barrack - middle - final target

I know that trigger looks weird, and it has been to long i don't remember why i did it that way but I know it worked
 
Status
Not open for further replies.
Top