• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Stop units from going back when ordered?

Status
Not open for further replies.
Level 4
Joined
Aug 12, 2004
Messages
76
I am currently making a defense game. However, even though I put ignore guard positions and ordered the units to attack a certain point, after attacking a bit, the units return to where they spawned. Is there a way to fix this?
 
Level 9
Joined
Oct 11, 2009
Messages
477
These what you called "excess units". Try removing them after their target is destroyed or create a 1 second periodic trigger in which it will order the units to prevent them from going back.
 
Level 4
Joined
Aug 12, 2004
Messages
76
Err let me rephrase my question.

Here is what I want to do.

Spawn a unit at Point A.

Make the units attack all the way to Point B.


However, here arises a problem.

The spawned unit, after reaching halfway by meeting some resistance, say a hero, after attacking a while, returns back to the spawn point A.

Is there a way to stop this from happening?
 
Level 4
Joined
Aug 12, 2004
Messages
76
All I put for the trigger was


Order unit issuing a Point

And I made a unit attack-move to that point.


After being blocked once by its own unit or after engaging in combat with no other enemies in sight, the unit either stops there or goes back to its spawn point.
 
Level 3
Joined
Dec 21, 2008
Messages
26
Gameplay Constants -> Creeps -> Guard Return Time make it really high :)
and they won't turn around unless ordered or time has run out since last order :cute:

maybe also the two other creep guard settings if that doesn't work... but it should.
 
Status
Not open for further replies.
Top