- Joined
- Jun 27, 2010
- Messages
- 2,771
hey everyone, i tried to make a trigger that checks if between the two units there is a something that blocks pathing and make them stop, but it's not working and I cant figuire out why.
Ideas?
but it's not working!
Ideas?
-
Line of Sight Spells
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Target unit of ability being cast) Not equal to No unit
-
-
Actions
-
-------- --------------------- --------
-
-------- --------------------- --------
-
Set LOS_PointCaster = (Position of (Casting unit))
-
Set LOS_PointTarget = (Position of (Target unit of ability being cast))
-
Set LOS_Distance = (Distance between LOS_PointCaster and LOS_PointTarget)
-
Set LOS_Angle = (Angle from LOS_PointCaster to LOS_PointTarget)
-
-------- --------------------- --------
-
-------- --------------------- --------
-
For each (Integer A) from 1 to (Integer((LOS_Distance / 5.00))), do (Actions)
-
Loop - Actions
-
Set LOS_TempPoint = (LOS_PointCaster offset by ((Real((Integer A))) x 5.00) towards LOS_Angle degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Terrain pathing at LOS_TempPoint of type Buildability is off) Equal to True
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Stop
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_LOS_TempPoint)
-
-
-
-
but it's not working!
Last edited: