Units always returning to their point of oringin

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Hi,
I've a weird problems with spawning & ordering units. In my map I am spawning a bunch of soldiers at a random point and order them to attack-move to the middle of the map.
Everything's fine till then, but when those units reach their destination they turn around and run back to the place they spawned at o.0
I am sure that I don't use any other triggers that order units around, and I am also not using any AI script.
I've tried turning off the unit's guard position, but that doesn't change anything at all.
Also when I order them to move instead of attack-move it works fine. They also don't return when they received a stop order, though they do return when I give them a stop oder and let them attack-move after that.

I'm pretty much out of ideas of what it could be, hope some of you can help.
Thanks in advantage
~s3r
 
Is there anything to attack? o_O You have to have enemies there, of course. Also, if the middle is full and they can't get there after a while, they might return back.

Btw, is your wacraft username: JunoApollo? rofl.
 
No, my battlenet name is also s3rius^^
Well, I do have enemies roaming around the map, but the soldiers easily reach their point of destination and slay the few foes without casualties.
They're immediately turning back when their attack-move order "runs out".
It also only happens if the units are controlled by a computer player.
 
Easiest way to disable this is in Advanced > Gameplay Constants. Under "Creeps," take all three fields about returning to guard point, and set them all to 9999999.

EDIT: Here:

96612856rz3.gif


There's also a way to do it with AI triggers ("ignore guard points"), but this is an easier and more foolproof way.
 
That's no use. I forgot to mention that the units are owned by Player 10 (which is a computer player in my map) and not neutral aggressive.
Also, I have already set those 3 values to somewhat a billion a while ago concerning other issues..
 
Then based on your post, I have no idea. You'd have to post the map, or at least the text of all your actions.
 
Then based on your post, I have no idea. You'd have to post the map, or at least the text of all your actions.

For some reasons I'd like not to post the whole map, but the actions won't help much, also, I believe.

JASS:
set groupLeader = CreateUnitAtLoc(Player(9), 'z003', Location(*lot of text that defines a random loc*)
    call UnitAddItemById(groupLeader, 'I009') //adding his equipment
    call UnitAddItemById(groupLeader, 'I00I') //not really important
    call RemoveGuardPosition(groupLeader) //Just for testing purpose
    call IssuePointOrder(groupLeader, "attack", 0,0)


I tried using this and it made the unit act correctly:
JASS:
set groupLeader = CreateUnitAtLoc(Player(9), 'z003', Location(*lot of text that defines a random loc*)
    call UnitAddItemById(groupLeader, 'I009') //adding his equipment
    call UnitAddItemById(groupLeader, 'I00I') //not really important
    call RemoveGuardPosition(groupLeader) //Just for testing purpose
    call IssuePointOrder(groupLeader, "attack", 0,0)
    call TriggerSleepAction(0.)
    call IssueImmediateOrder(groupLeader, "stop")
    call TriggerSleepAction(0.)
    call IssuePointOrder(groupLeader, "attack", 0,0)

(Ofc now it went to Loc(0,0) and not my randomly chosen location, but doesn't really matter.)
But it's a rather uncomfortable thing to do with several unit that are created via loop >.<
 
I have exactly the same problem. Was this ever solved?

Spawned units (owned by computer player #12) return to their spawning point after reaching their region - and I do NOT want that happening.
 
Easiest way to disable this is in Advanced > Gameplay Constants. Under "Creeps," take all three fields about returning to guard point, and set them all to 9999999.

EDIT: Here:

96612856rz3.gif


There's also a way to do it with AI triggers ("ignore guard points"), but this is an easier and more foolproof way.

a bit offtopic but: what WE is that?
 
BornANoob[MR], thanks. I try that but for some reason I doubt it will work in the way I want. Maybe because units don't have a particular mission to do in the regions (like killing a unit).

In my map there are plenty of regions and units move between them. It is like: When units arrive at region 1 they randomly choose to move on region 2,3 or 4.

Here is an example:
EastP01
Events
Time - Every 5.00 seconds of game time
Conditions
(Number of units in (Units in MovePointEast01 <gen> owned by Player 12 (Brown))) Greater than 3
Actions
Set Number = (Random integer number between 1 and 4)
Unit Group - Pick every unit in (Units in MovePointEast01 <gen>) and do (Unit Group - Add (Picked unit) to Zombies01)
If (Number Equal to 1) then do (Unit Group - Order Zombies01 to Attack-Move To (Center of MovePointEast15 <gen>)) else do (Do nothing)
If (Number Equal to 2) then do (Unit Group - Order Zombies01 to Attack-Move To (Center of MovePointEast02 <gen>)) else do (Do nothing)
If (Number Equal to 3) then do (Unit Group - Order Zombies01 to Attack-Move To (Center of MovePointEast10 <gen>)) else do (Do nothing)
If (Number Equal to 4) then do (Unit Group - Order Zombies01 to Attack-Move To (Center of MovePointEast11 <gen>)) else do (Do nothing)
Unit Group - Remove all units from Zombies01

And I do want that units stop before starting to move again so they don't look like they are moving all the time. This is excatly why I want to remove that 'returning' thing.
 
BornANoob[MR], thanks. I try that but for some reason I doubt it will work in the way I want. Maybe because units don't have a particular mission to do in the regions (like killing a unit).

In my map there are plenty of regions and units move between them. It is like: When units arrive at region 1 they randomly choose to move on region 2,3 or 4.

Here is an example:


And I do want that units stop before starting to move again so they don't look like they are moving all the time. This is excatly why I want to remove that 'returning' thing.

just a tip, post triggers in Codes, highlight your trigger an press the # button
 
Is this unsolved?
If so, do you have the Melee Init triggers still in your map?
They cause problems.
If you have them, delete them and you should be fine!
 
CheesyBeefy, yep. It is machintosh. But let's stay in topic, PLEASE.

AdamGriffith, thanks for reply but I am sure that there are no melee initialization triggers (if u mean triggers like: "Run Melee AI" etc.). I have tried to change Game Constant values (guard distances & times) and tried to disable returning via initialization triggers (was something like: AI - turn on/off Guard distances).

I was wondering, should I really make the creeps neutral hostile and not some computer player property? Would that help anything? If not, what should I do?

Has anyone ever even made this shit before?! Hard to believe but it is true that usually creeps are ordered to move/attack from a region to a region without a pause or time to think anything else.

I have tried to find a solution for this matter for some time without success. Please, help if you can and tell me if you need more trigger examples.
 
You could order the units to stop once they enter the region, put a wait in for however long you want them to stop, then order them to move again.

Thats what I did, without the "wait" part.
 
Infinitegde,

In my map there are over 30 regions where zombies can travel. And there are at least the same amount of zombies walking between the regions. If I add "wait"-action in the 30 triggers wouldn't they overwrite each other or something? Would it still work even they were executed at the same time?

I try this, too, when I get home. I am working at the moment. Thanks for the hint. Maybe I should make somekind of general "stop"-trigger or something...
 
Do something like this.

Event
A unit enters region(Whatever Region)

Condition
Unit-type of entering unit equal to Zombie

Actions
Order (entering unit) to stop
Wait 2 seconds
Pick every unit in region(whatever region) matching condition (unit-type of matching unit = to Zombie)
Loop
Order unit to Attack-move to (wherever)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3
  • The Helper The Helper:
    New forum coming soon going to be for my friend Saylor who is blind and he is doing motivational speaking and has an internet radio show and podcast. I am going to put a forum to promote him and other inspirational speaker stuff going to have some good stuff in it.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top