- Joined
- Jul 6, 2012
- Messages
- 66
I work on a spell which confuses enemies when hitting them. Confused enemies can't perform targeted orders properly.
Currently, the system just makes them run around randomly when given a targeted order.
I can catch the given order by saving it in variables. But I can't put it into the Order triggers, because it simply doesn't accept variables, and only accepts whatever it has listed.
So this here does not work
Currently, the system just makes them run around randomly when given a targeted order.
-
Confuse
-
Events
-
Unit - A unit Is issued an order targeting an object
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
((Triggering unit) has buff -Confuse ) Equal to True
-
-
Actions
-
Set TempLoc[1] = (Position of (Triggering unit))
-
Set TempLoc[2] = (TempLoc[1] offset by (Random real number between 300.00 and 500.00) towards (Random angle) degrees)
-
Trigger - Turn off (This trigger)
-
Unit - Order (Triggering unit) to Move To TempLoc[2]
-
Trigger - Turn on (This trigger)
-
Custom script: call RemoveLocation(udg_TempLoc[1])
-
Custom script: call RemoveLocation(udg_TempLoc[2])
-
-
I can catch the given order by saving it in variables. But I can't put it into the Order triggers, because it simply doesn't accept variables, and only accepts whatever it has listed.
So this here does not work
-
Set OrderVariable = (Issued order)
-
Unit - Order (Triggering unit) to OrderVariable To TempLoc[2]