• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Prevent unit from walking over region

Status
Not open for further replies.
Unit enters region

set point1 = position of unit
set point2 = point1 offset by x towards (facing of triggering unit - 180)
Custom script : call SetUnitX(GetTriggerUnit(), GetLocationX(udg_point2))
Custom script : call SetUnitY(GetTriggerUnit(), GetLocationY(udg_point2))
remove point1
remove point2

https://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

You can turn the trigger off.
 
  • Environment - Set terrain pathing at (Center of (Playable map area)) of type Walkability to Off
  • Environment - Set terrain pathing at (Center of (Playable map area)) of type Walkability to On
cuz Blizzard Entertainment doesn't create a "Pick point in Region" function for World Editor so I think you need to do them 1 by 1 . . .
 
What do you meant by "prevent" ?
Unit gets pushed when nearing the region ?
Unit dies when enters the region ?

If you follow Maker's trigger, the unit will be moved instantly to the direction behind the unit by X offset.

But if you use this trigger, it's dangerous because if your unit is knockbacked by another trigger, entering the region with the angle of the unit facing behind, the trigger will move the unit closer to the "forbidden area".

But this will unlikely to happen.
 
What do you meant by "prevent" ?
Unit gets pushed when nearing the region ?
Unit dies when enters the region ?

If you follow Maker's trigger, the unit will be moved instantly to the direction behind the unit by X offset.

But if you use this trigger, it's dangerous because if your unit is knockbacked by another trigger, entering the region with the angle of the unit facing behind, the trigger will move the unit closer to the "forbidden area".

But this will unlikely to happen.

i dont want unit to be teleported out of region
i want to make him not crossable
so unit wont walk over it
 
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 102 <gen>
    • Conditions
    • Actions
      • Unit - Move (Entering unit) instantly to ((Center of Region 102 <gen>) offset by (0.00, 0.00))
When a unit enters your region, try moving it an offset. Its up to you on what numbers you like at the offset. Also try setting in a variable Entering Unit or Triggering unit (whatever you used).
 
Status
Not open for further replies.
Back
Top