Using triggers to move armies issue

Status
Not open for further replies.
Level 4
Joined
Jun 5, 2007
Messages
100
Hi guys, I'm working on a singleplayer map in which a large enemy army advances on an allied base. I have this trigger to do so
http://i.imgur.com/Z8lEmVf.png

pretty simple, and for the most part it works except it only sends about 12 units from the region and the rest just sit there. Do I need to break it up into smaller regions and redo the trigger? I've tried duplicating the trigger but it didn't have any effect.

Thanks in advance.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Dat rep.

Sometimes your Region should be a bit more large than the desired area - because sometimes Unit Group pick doesn't seem to correspond correctly to pick unit inside the Region, although we see it with our eyes that the unit is indeed inside the Region, but actually it's not.

Therefore try to increase the Region size just a little bit more and see if that helps.

Also, you have to do it like this in order to pick all units inside Region and do actions to them;
  • Actions
    • Set TempLoc = (Center of Region 001 <gen>)
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in Region 000 <gen>) and do (Actions)
      • Loop - Actions
        • Unit - Order (Picked unit) to Move To TempLoc
    • Custom script: call RemoveLocation(udg_TempLoc)
 
Level 4
Joined
Jun 5, 2007
Messages
100
I was surprised to find out I had an account on the hive workshop in the first place, no idea what I did to get the rep.

I appreciate your response, but can you explain to me whats going on in that trigger so that I can easily replicate it and change it?
 
Level 4
Joined
Jun 5, 2007
Messages
100
Oh sorry, the parts I'm confused about are the templock line and the custom script part. I don't know anything about custom scripts or what arithmetic the templock thing is referring to.

Thanks for your patience with my noobery, I appreciate it.
 
Status
Not open for further replies.
Top