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!
Disclaimer: Everything here is based on my interpretation.
What does it do?
This system takes advantage of some of Wc3's own pathfinding to calculate if a point is reachable which has two limitations.
Limitation 1: Can only check if a point is reachable for ground units with less than 32 collision size
Limitation 2: Has limited "range" to find a path. If a path exists but can't be found, it returns false
How does it works?
It's based on the instant (like Berserk) ability Call To Arms. When casting Call To Arms, a unit will try to find a path to the closest Town Hall and if it can't be found the unit won't react, in contrast to the regular pathfinding where the unit attempts to reach its destination, even if a path doesn't exist.
The system in detail
1) The unit Transmitter (1) is moved to the starting point and Reciever (2) to the ending point.
2) The facing of Transmitter (1) is manipulated to avoid false negatives that occur when the Transmitter (1) is near and facing Reciever (2) when ordered to cast Call To Arms. This also avoids Transmitter (1) from morphing and morphing is a waste of resources.
3) Transmitter (1) issues Call To Arms.
4) If Transmitter (1) has the order militia, the point is reachable and the ability Move is removed and re-added from Transmitter (1), which appears to reset the units pathfinding calculations.
Is Point Reachable System
Events
Conditions
Actions
-------- Moves Transmitter (1) to the starting point and Reciever (2) to the ending point --------
Custom script: local real x1 = GetLocationX(udg_IPR_Point[1])
Custom script: local real y1 = GetLocationY(udg_IPR_Point[1])
Custom script: local real x2 = GetLocationX(udg_IPR_Point[2])
Custom script: local real y2 = GetLocationY(udg_IPR_Point[2])
Custom script: call SetUnitX(udg_IPR_Unit[1], x1)
Custom script: call SetUnitY(udg_IPR_Unit[1], y1)
Custom script: call SetUnitX(udg_IPR_Unit[2], x2)
Custom script: call SetUnitY(udg_IPR_Unit[2], y2)
-------- Avoids false negatives when starting point and ending point are close --------
How to import?
1. Copy the units Transmitter (1) and Reciever (2) to your map
2. Copy the abilities Call To Arms (Transmitter) and Call To Arms (Reciever) to your map
3. Make sure the units Transmitter (1) and Reciever (2) has their corresponding Call To Arms ablities and that the ability Call To Arms (Transmitter) has the correct Normal Form Unit
4. Copy the Category Is Point Reachable 1.0.2 [Duckfarter] to your map
5. Set IPR_UnitType[1] as Transmitter (1) and IPR_UnitType[2] as Reciever (2) in the trigger Init Is Point Reachable
How to use?
1) Set IPR_Point[1] as the starting point
2) Set IPR_Point[2] as the ending point
3) Run Is Point Reachable System
4) IPR_IsPointReachable is True if reachable
Demo 1
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Issued order) Equal to (Order(smart))
Actions
-------- How to use: --------
-------- 1) Set IPR_Point[1] as the starting point --------
-------- 2) Set IPR_Point[2] as the ending point --------
-------- 3) Run Is Point Reachable System --------
-------- 4) IPR_IsPointReachable is True if reachable --------
Set VariableSet IPR_Point[1] = (Position of (Triggering unit))
Set VariableSet IPR_Point[2] = (Target point of issued order)
Trigger - Run Is Point Reachable System <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
IPR_IsPointReachable Equal to True
Then - Actions
Game - Display to Player Group - Player 1 (Red) the text: Point is |cff00ff00...
Else - Actions
Game - Display to Player Group - Player 1 (Red) the text: Point is |cffff0000...
A creative and novel way of solving an old problem.
I tried around a bit, but couldn't solve any of the limitations you mention. Also couldn't find a way to make the dummy face the movement direction instantly. You could get the direction with a...
20 years later some fresh faced hobbiest discovers a filthy, unwashed hack to calculate if a unit can path in a single frame. Impressive work master duck farter, may you keep huffing those farts.
20 years later some fresh faced hobbiest discovers a filthy, unwashed hack to calculate if a unit can path in a single frame. Impressive work master duck farter, may you keep huffing those farts.
A creative and novel way of solving an old problem.
I tried around a bit, but couldn't solve any of the limitations you mention. Also couldn't find a way to make the dummy face the movement direction instantly. You could get the direction with a delay, but one wouldn't need your system to do that.
The system is easy-to-use and its limitations are clearly documented.
A creative and novel way of solving an old problem.
I tried around a bit, but couldn't solve any of the limitations you mention. Also couldn't find a way to make the dummy face the movement direction instantly. You could get the direction with a delay, but one wouldn't need your system to do that.
The system is easy-to-use and its limitations are clearly documented.
Wow, didnt excpect that rating, though it has taken me a quite some time and effort to get the system working great.
Long story short: You are free to make a Lua translation but I have thought a lot about the system and am planning on uploading kind of a big change so you may wanna hold off until then, but its up to you.
Wonder what happens if one uses this method in multiple ways like moving creeps around, normal melee townhalls and detecting if a spot can be pathed too? Fun part to note is they'll follow what townhall-imitator starts first and ignore the rest until finished.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.