BlackNerubia
New Member
- Reaction score
- 12
Alright so im trying to make a trigger that teleports a unit to a point if there are no enemy units within 100 range of the casting unit, but i cant seem to get it working right
any help would be greatly appreciated
Code:
Move Conditions
Events
Unit - A unit Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Ability being cast) Equal to Move
Players_Turn[(Player number of (Triggering player))] Equal to True
Actions
Unit Group - Remove all units from MovmentGroup
Set Point = (Target point of ability being cast)
Set TempUnit = (Casting unit)
Unit Group - Pick every unit in (Units within 100.00 of Point) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked unit) Equal to No unit
(Picked unit) Equal to TempUnit
Then - Actions
Unit - Move (Casting unit) instantly to Point
Else - Actions
Game - Display to (All players) the text: You cannot move wit...
Unit - Order TempUnit to Stop
Custom script: call RemoveLocation( udg_Point )