- Joined
- Mar 1, 2013
- Messages
- 555
Hi everyone
I tried to make a trigger that makes an owned unit uncontrollable. The concept is to have a bool that, when true, that order will be replaced with the original order. However I got quite some interesting results.
(uses Bribe's unit indexer)
Sample 1:
Sample 2:
Thank you for your time.
I tried to make a trigger that makes an owned unit uncontrollable. The concept is to have a bool that, when true, that order will be replaced with the original order. However I got quite some interesting results.
(uses Bribe's unit indexer)
Sample 1:
-
Sample 1
-
Events
- Unit - A unit Is issued an order with no target
- Unit - A unit Is issued an order targeting a point
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CancelOrder[(Custom value of (Triggering unit))] Equal to True
-
Then - Actions
- Game - Display to (All players) the text: Cancel
- Set Temp_Int = (Custom value of (Triggering unit))
- Set CancelOrder[Temp_Int] = False
- Unit - Pause UDexUnits[Temp_Int]
- Unit - Order UDexUnits[Temp_Int] to Stop
- Unit - Unpause UDexUnits[Temp_Int]
- Set CancelOrder[Temp_Int] = True
-
Else - Actions
- Game - Display to (All players) the text: continue
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Sample 2:
-
Sample 2
-
Events
- Unit - A unit Is issued an order with no target
- Unit - A unit Is issued an order targeting a point
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CancelOrder[(Custom value of (Triggering unit))] Equal to True
-
Then - Actions
- Game - Display to (All players) the text: Cancel
- Set Temp_Int = (Custom value of (Triggering unit))
- Set CancelOrder[Temp_Int] = False
- Unit - Pause UDexUnits[Temp_Int]
- Unit - Order UDexUnits[Temp_Int] to Stop
- Unit - Unpause UDexUnits[Temp_Int]
-
Else - Actions
- Game - Display to (All players) the text: continue
- Wait 0.00 seconds
- Set Temp_Int = (Custom value of (Triggering unit))
- Set CancelOrder[Temp_Int] = True
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Thank you for your time.