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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. 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.

[General] You shall not pass!! The best way to stop units from passing certan areas

Discussion in 'World Editor Help Zone' started by nedio95, Feb 21, 2013.

?

Which metod to use ?

Poll closed Mar 24, 2013.
  1. 1) Regions

    64.3%
  2. 2) Patching blockers

    35.7%
  3. 3) Waygates

    0 vote(s)
    0.0%
  4. 4) Other. Please specify in post.

    0 vote(s)
    0.0%
  1. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,175
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Try
    • Set TempPointC = (TempPointA offset by ((Current movement speed of TempUnitA) x 0.03) towards (Angle from TempPointA to TempPointB) degrees)

    and see what happens ;)
     
  2. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Wouldn't that backfire if the unit has low ms or the user spams move command ? Or you mean it only for the Kyousuke Imadoris suggestion ?
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,943
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    No because it is always dragged towards the centre until within a certain distance (or region). Especially when using SetUnitX/Y with a period of 0.03 this would give the nice result of having the unit appear to keep walking out but not moving.
     
  4. DESTROYER123

    DESTROYER123

    Joined:
    Jul 12, 2011
    Messages:
    1,200
    Resources:
    0
    Resources:
    0
    A killing region!
    When a unit is trying to move out of bounds he enters the out of bound regions and boom! he explodes!!! (use this)

    Hell yeah regions!!!
     
  5. Zeatherann

    Zeatherann

    Joined:
    Nov 25, 2008
    Messages:
    1,303
    Resources:
    6
    Skins:
    1
    Tools:
    1
    Maps:
    4
    Resources:
    6
    Second solution; make a region around the base; when a unit not in a party leaves it, change the unit's owner to neutral passive and order it to move back inside the region with a message "you can't leave base unless in a party!".
     
  6. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,865
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Why not just track all orders in the map and compare the order target position to the unit position?
    If the order target is outside the allowed move area, simply issue a stop command.

    Most elegant and easy solution.
    No regions, no crappy move triggers, no problems.

    As additional security, in case a unit is ordered to follow another unit, simply issue a move command back to the save zone when it reaches the door.
     
  7. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,943
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Until you order a group of units to the edge and find that they are starting to push each other outside...

    No mater how safe you make it, I am sure there are ways out.
     
  8. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,865
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    If that happens, you can always add the "when door area is reached, order the unit to walk back" thing.
    No there aren't. I used a script like that plenty of times and there is no way out.
    Even if you spam click outside, the unit won't give a shit and just stand there.
     
  9. MajorKaza

    MajorKaza

    Joined:
    Nov 19, 2011
    Messages:
    511
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Move out by trigger. Slow down to 0 is just to stop and buff for correct check.