• 🏆 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!

[JASS][Trigger] Terrain Pathing

Status
Not open for further replies.
Level 3
Joined
Oct 30, 2009
Messages
49
Is there a way to make a certain type of terrain, for example "Ashenvale Rock" unpathable to land units VIA triggering/Jass? I know I could place pathing blockers, but this method would take me forever and likely push the limit of doodads allowed in a map.
It seems like I've come across something in the past that would do it, but I can't seem to find it now.
Also, if there is no way to do this, i would be awesome if someone could assist me in writing a non-leaking trigger that finds the terrain type infront of a unit and if the unit is x feet away from "ashevale rock" change the units movement speed to 0.
Thanks in advance. :pcon:

Edit:
I decided to try and work on it, I came up with a working trigger, the only issue is that I believe it has several leaks. I was looking at Ralle's post about "things that leak" and fixed one of them, I'm not really sure how to do the others.
  • Events
    • Time- Every 0.05 seconds of game time
  • Conditions
  • Actions
    • Set Allunits = (Units in (Playable map area)
    • Unit Group - Pick every unit in AllUnits and do (If ((Terrain type at (Position of (Picked unit))) Equal to Ashenvale - Rock) then do (Unit - Order (Picked unit) to Stop) else do (Do nothing))
    • Unit Group - Pick every unit in AllUnits and do (If ((Terrain type at (Position of (Picked unit))) Equal to Ashenvale - Rock) then do (Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 40.00 towards ((Facing of (Picked unit)) - 180.00) degrees)) else do (Do nothing))
    • Custom script: call DestroyGroup(udg_AllUnits)
Admins you can delete this post. This system is nearly useless because units ignore it as pathing. I believe someone else has already created a similar system in the past anyway.
 
Last edited:
Status
Not open for further replies.
Top