• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Running away when being attacked

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
here is the scenario
-Unit1 has no attack
-Unit2 attacked Unit1
-Unit1 runs away

how do i prevent Unit1 from running away every time the unit is under attack? also, triggers that would prevent from stopping the players last order.
and making the trigger affect all units who doesn't have any attacks
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
here is the scenario
-Unit1 has no attack
-Unit2 attacked Unit1
-Unit1 runs away

how do i prevent Unit1 from running away every time the unit is under attack? also, triggers that would prevent from stopping the players last order.
and making the trigger affect all units who doesn't have any attacks

Let me guess, this is for a TD? Try constantly ordering the units to move to the point they need to move to instead of doing this once. You can do this by giving a specific custom value to the units that have passed by a certain point in order to order them to move to the next point in a periodic event.

There was also another more simple solution for this but I can't recall at this moment, I'll try to find out again...

EDIT:
I think it was something called: Can't Flee inside the object editor...
 
Level 11
Joined
Jun 21, 2007
Messages
505
Object Editor
Stats - Can Flee = false

EDIT:
Klann, remember you said: "r attack? also, triggers that w". Can you tell a bit more about the part after the question sign?

EDIT2:
i just said this in advance so if ever that solving this problem requires triggers then this might prevent you guys from using order the unit to stop which would also stop the units who are channeling spells, then that would really be bad :)

Oh, you could check a unit's current order. For example, when a Lich casts Death and Decay, his order is deathanddecay all the time until the channeling stops.
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
Object Editor
Stats - Can Flee = false

yeah, thats it ;)
but this doesn't mean that the orders can not be stopped...
I suggest doing both things I've explained in my first post in order to make sure no move orders are being stopped unexpectedly.
 
Level 9
Joined
Apr 7, 2010
Messages
480
well. its pretty much "Can Flee = false" is the solution. anyways,
Object Editor
Stats - Can Flee = false

EDIT:
Klann, remember you said: "r attack? also, triggers that w". Can you tell a bit more about the part after the question sign?

i just said this in advance so if ever that solving this problem requires triggers then this might prevent you guys from using order the unit to stop which would also stop the units who are channeling spells, then that would really be bad :)

also. problem solved. +rep to you guys
 
Status
Not open for further replies.
Top