- Joined
- Oct 29, 2012
- Messages
- 1,474
Hello guys, well, I am trying to make a unit cast a lightning that stops with the nearest cliff ahead (I mean in front of the unit, not detecting the closest cliff)
I have this trigger and it doesn't seem to work :
I have this trigger and it doesn't seem to work :
A Lightning that stops with the nearest cliff ahead
Actions
Set i = 1
For Each Integer (f) from 1 to i --- do actions
Loop - Actions
Set TempPoint = (Position of -My Unit- offset by (f x 10) towards (Facing Angle of (My Unit)
If/Then/Else
Conditions
Terrain Cliff Height in TempPoint Equal to 2
Then - Actions
Set i = i +1
Else - Actions
Lightning - Create a lightning effect between source 'TempPoint' and Target '(Position of MyUnit)'
-- removed leaks after that