Unit returns to spawning point for no reason

Zealot

Member
Reaction score
11
I made a trigger so that when the unit is attacked it moves in the opposite direction of the attacker a certain range.
Unit has no ability (not even Wander) and yet it returns to it's original spawning point even though I have no trigger that would cause this. The unit is Neutral Passive (could this be the cause?)
This is the trigger:
Trigger:
  • Herbivore AI
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacked unit)) Equal to Goat
        • Then - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Attacked unit) is in Creature_Group_Goat[(Integer A)]) Equal to True
                • Then - Actions
                  • Unit Group - Pick every unit in Creature_Group_Goat[(Integer A)] and do (Actions)
                    • Loop - Actions
                      • Set Creature_Move_Point = ((Position of (Attacking unit)) offset by (Random real number between 1500.00 and 5000.00) towards (Facing of (Attacking unit)) degrees)
                      • Unit - Order (Picked unit) to Move To Creature_Move_Point
                • Else - Actions
        • Else - Actions

Also I know it leaks but I'm not fixing it until I find out the answer to this conundrum.[/wc3]
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
All player owned units return to their "guard location" after some while. The neutral players count as players.
I dont know if ignoring the units guard position works for neutral units but its worth a try.
AI - Ignore units guard position
 

Zealot

Member
Reaction score
11
All player owned units return to their "guard location" after some while. The neutral players count as players.
I dont know if ignoring the units guard position works for neutral units but its worth a try.
AI - Ignore units guard position
Where can I edit this?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
There is a trigger function:
AI - ignore units guard position
 

Zealot

Member
Reaction score
11
There is a trigger function:
AI - ignore units guard position

Neither
Trigger:
  • AI - Ignore the guard positions of all Neutral Passive units


Or the single unit version work.
Can I make it so I disable the AI for Neutral Passive completely or something to that effect?
 

vypur85

Hibernate
Reaction score
803
In your Terrain Editor go to 'Advanced' tab and then click 'Gameplay Constant'. Look for 'Creep - Guard Return Time'. Set the time to max. You can check out other 'Creep' fields also and adjust accordingly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top