1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Running away when being attacked

Discussion in 'World Editor Help Zone' started by Klann, Jan 5, 2012.

  1. Klann

    Klann

    Joined:
    Apr 7, 2010
    Messages:
    470
    Resources:
    0
    Resources:
    0
    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
     
  2. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    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...
     
  3. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    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:
    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: Jan 6, 2012
  4. Hashjie

    Hashjie

    Joined:
    Apr 20, 2009
    Messages:
    1,515
    Resources:
    0
    Resources:
    0
    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.
     
  5. Klann

    Klann

    Joined:
    Apr 7, 2010
    Messages:
    470
    Resources:
    0
    Resources:
    0
    well. its pretty much "Can Flee = false" is the solution. anyways,
    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