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
 

thewrongvine

The Evolved Panda Commandant
Reaction score
506
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.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
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.
 

Pender

New Member
Reaction score
32
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.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
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..
 

Pender

New Member
Reaction score
32
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.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
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 >.<
 

Templarion

Member
Reaction score
8
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.
 

X-maul

AKA: Demtrod
Reaction score
201
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?
 

Templarion

Member
Reaction score
8
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.
 

X-maul

AKA: Demtrod
Reaction score
201
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
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
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!
 

Templarion

Member
Reaction score
8
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.
 
Reaction score
86
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.
 

Templarion

Member
Reaction score
8
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...
 
Reaction score
86
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:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top