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

Problems with spell avoiding path blockers.

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
460
Hello, I am working on a map and a lot of the map, well the general section, is blocked by Pathing Blockers(Both) and the spell, Geyser Jump from Rmx's Water Spell Pack is allowing the unit to skip over the path blockers and be locked into the outer section of the map. Now obviously my map is not a parallelogram and its divided into various sections on multiple angles. For a screenshot click here. The question remains, how do I make it so if a player "jumps" out of the area I want units to be in, how do i make him move back in? Would it require something like a trigger that checks the tile under every unit of type hero == all tiles directly outside of all pathing blockers? And also I'm not sure it's possible to check if they are in water because in the town section and other sections of the map it's possible to walk in the water.
 
How about creating regions for the areas you don't want units to be in.
Also, you could IsUnitMoving by Bribe to help you.

If a unit enters a restricted region:

  • Custom script: local unit u = GetTriggerUnit()
  • Custom script: local integer id = GetUnitUserData(u)
  • Custom script: call SetUnitX(u, udg_UnitMovingX[id])
  • Custom script: call SetUnitY(u, udg_UnitMovingY[id])
  • Custom script: set u = null
 
Level 9
Joined
Apr 23, 2011
Messages
460
I'll do this when it not... 1:30 in the morning.

Edit: I have discovered that this is a very difficult task and so as a catch for some unique, bizarre situation, I will create a -unstuck command that will send you to a safe location that is near a shop.
 
Last edited:
Status
Not open for further replies.
Top