Summary
A very common problem for tower defense games is detecting when a player is taking advantage of unit pathing. The typical solution involves hoping units attack if they are walled and is very easy to defeat. AWall detects when units have been walled.

The system currently uses HAIL and SUEL [included in the example map], and requires vJass. The example map includes a GUI extension for people who can't write JASS.

Explanation
AWall does various checks to runners that have been added to the system. It periodically checks if runners are stopped, attacking, or stuck, it drops 'breadcrumb' rects behind runners to see if they backtrack, it catches runners attacking towers, etc.

When you create a runner you want wall detection on, add it to the system using AWall_AddRunner. When a player builders a tower use AWall_AddTower on it [only necessary if you use attack prevention]. When a runner reaches a waypoint, use AWall_ResetRunner [backtracking is possible after waypoints, this removes the currently dropped bread crumbs for that unit].

When it detects that a runner has been walled, it runs callbacks registered using AWall_RegisterForWalled. It sets the globals AWall_unit to the runner, and AWall_reason to the reason it believes the unit was walled. For example, if the unit was attacking, reason will be set to AWALL_REASON_ATTACKING. It is the maps job to punish the player, save the unit or whatever else the maker wants. AWall only does detection.

If a unit is/was recently snared or stunned, the wall detection will still activate, but it will have a reason set to AWALL_REASON_PREVENT. When you get PREVENT, you should usually not punish the player, but simply re-order the unit [it may have just been released and started attacking].

if not IssuePointOrder(Unit,SomeRB("move"),x,y) then
call Echo("Unit cannot complete this order")
endif

I'm not exactly sure what your point is. Do you think IssuePointOrder will detect walls? It won't.

- Even if a unit can't reach the destination it will move to a closer point, so the order still succeeds [tested and confirmed, please don't state things like this unless you've tested them].
- Even if the order returned false if the destination wasn't reachable, units can be walled after they are ordered.
- Even if you could detect the destination becoming unreachable, juggling units only requires switching maze exits back and forth (never closing both, therefore the end is always reachable).

You _need_ backtrack detection if you want to stop juggling [*without severely interfering with players like blocking building during rounds].