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

Attack-Move Stops working

Status
Not open for further replies.
Level 2
Joined
Nov 10, 2010
Messages
22
Firstly, I apologize if the thread title is confusing or inadequate. I'll explain:

So I opened up a map template I downloaded from the Hive (It's simply an environment of a sea side village - no custom units, no triggers) and began to add some of my own triggers to it, just for fun and practice. It wasn't ever intended to actually be an actual project, rather just something to blow off some steam from the difficulties I was having with the other map I was working on.

The problem came in with one - or possibly more - of the triggers I had set up. Everything was fairly simple: There were two Orcish Barracks and a Bestiary up in the Northeast corner of the map, and three triggers that were designed like this:
  • Grunts LowerLeft
    • Events
      • Time - Every 35.00 seconds of game time
    • Conditions
      • (Barracks 0112 <gen> is alive) Equal to True
    • Actions
      • Unit - Create 1 Troll Headhunter for Player 11 (Dark Green) at (Center of OrcSpawn1 <gen>) facing Default building facing degrees
      • Unit - Create 2 Grunt for Player 11 (Dark Green) at (Center of OrcSpawn1 <gen>) facing Default building facing degrees
And so on. I realize this leaks, and originally had it as a variable point and the RemoveLocation script, but as it wasn't intended to be played for more than a few minutes anyway or anything other than solo, I ended up removing them from future triggers when I re-entered them while trying to debug the problem I was having.

The problem? The units spawn and my Movement trigger sends them on their way nice and clean, but after the second wave the units stop moving entirely. They spawn and sit there, and every following wave they continue to sit there.

At first I thought it might have been from having a trigger for the Grunts every 35 seconds and Kodos every 70, so I set both to 35. No change. I then thought maybe having numerous triggers was causing it, so I made a new one and put all the spawning actions into one single trigger. No change.

I thought maybe the trigger got corrupted somehow, so I deleted them all and made a new one, and set it to every 15 seconds to see if there was any change faster. To my pleasure, the third wave continued on its way as it should have. I was about to stop playing and go back to working on the map when I saw the 7th wave had just stopped moving like the 3rd had before. The units began piling up and not moving once again.


The movement trigger itself:
  • Orc MainCamp
    • Events
      • Unit - A unit enters Orc Camp <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To (Position of Dummy Unit (Unit Director) 0129 <gen>)
*The 'OrcSpawn' region is right next to the barracks, and inside the Orc_Camp region which fully encompasses the spawning regions.
*The Dummy unit belongs to Neutral Passive (If it matters)

I then have an additional movement command afterwards:
  • Orc SW
    • Events
      • Unit - A unit comes within 512.00 of Dummy Unit (Unit Director) 0129 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To (Position of Dummy Unit (Unit Director) 0130 <gen>)

To summarize, the triggers work *for a while* and the units spawn and move out as intended. After a few waves, they simply stop. I can't figure out why - no trigger is directing them to the wrong location(s), I've disabled everything but the two triggers that spawn and move the first group, so nothing's conflicting with it... It's not pathing issues, and I've checked to make sure the regions are in the right places and that they're not being moved around somehow after the game starts.

I just can't figure it out. I've never had a problem like this, so I just simply don't know what to do.

If anyone actually wants to take a look at the map, I'll attach it.
http://www.hiveworkshop.com/forums/maps-564/seaside-village-template-241761/ (the original)
 

Attachments

  • Seaside Village orc raids.w3x
    133.1 KB · Views: 49
Level 2
Joined
Nov 10, 2010
Messages
22
Holy Jesus Christ, what a bad template, dude, what kind of thing do you really want, a trigger to spawn units for attack - defence ?

The map template I picked just because it looked nice. As for the triggers, I'm using the units for an offensive attack - I'm the one playing defense with a hero and a few towers.

They spawn just fine, but after a few spawnings they stop moving.
 
Level 2
Joined
Nov 10, 2010
Messages
22
Look at the things that leak tutorial. Then look at my tutorial. Things You Should Know When using Triggers / GUI.

Instead of using attack-move order them to patrol right after you spawn them. It is much more efficient.

I'm very well aware of the Things That Leak tutorial, and have referred to it many times in past World Editor usage. As mentioned in my original post, I initially had the triggers all first setting a Point Variable, spawning the units, then destroying that point via RemoveLocation script. The units stopped moving from their spawning location after a few spawns, and when I made a new trigger to see if it was a problem with the trigger itself, I didn't bother re-adding the leak removals.

I've read your tutorial a few times, I suppose I should be using Local Variables instead?

Right now leaks and efficiency isn't exactly what I'm worried about. I know how to remove location leaks, but what is causing me trouble at the moment is the units spawn and attack as they should, but then just stop attacking after the trigger has run a few times.



May I ask why though? I mean, what makes the Patrol command more efficient than Attack-Move? I'm curious as to what makes it so. since I've never actually issued that order via triggers before.


Look at this and tell me if this helps:
Hmm... I wasn't using variables for where they would attack - though I was originally using variables to place where they'd spawn. I'll try it like this next.

What I don't understand is I set it up like I always had, and never had any problems until now. Maybe it was the map itself, something got corrupted or...
 
Level 2
Joined
Nov 10, 2010
Messages
22
Set up global location and don't remove them. Only set them once. Use them from start to finish.

It isn't these triggers that are breaking.

Alright, this is what I have now:

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Set the time of day to 5.00
      • Set init_attack[0] = (Position of Dummy Unit (Unit Director) 0129 <gen>)
      • Set init_attack[1] = (Position of Dummy Unit (Unit Director) 0121 <gen>)
  • Orc Main
    • Events
      • Unit - A unit enters Orc Camp <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Unit - Order (Triggering unit) to Attack-Move To init_attack[0]

Now the spawned units don't just stand there - they move out and continue on the paths I set for them, but after a few waves sometimes the spawned units will get to just about where the first marker is (A dummy unit) and then begin patrolling back to their spawning point. Usually only if there's no one nearby, but still. It's an improvement - They're not getting clogged up at their spawning spot anymore.

Thank you both for your help thus far, I appreciate it very much.


I'm still just confused why I've never seen this behavior before. I've always just had a unit spawn then send him to a point after he spawns, and that would be that.
 
Status
Not open for further replies.
Top