So i've made these triggers :
-
Acolyte BarrackP0
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
(Unit-type of (Constructing structure)) Equal to Barrack
-
-
Actions
-
Wait 2 seconds
-
Set VariableSet ClosestUnit = No unit
-
Set VariableSet ShortestDistance = 900000.00
-
Set VariableSet DummyBuilding = (Position of (Constructing structure))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 375.00 of DummyBuilding matching ((((Matching unit) is alive) Equal to Vrai) and ((Unit-type of (Matching unit)) Equal to Acolyte)).) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
Set VariableSet UnitLocation = (Position of PickedUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Equal to (Order(stand down))
-
(Distance between DummyBuilding and UnitLocation) Less than ShortestDistance
-
-
Then - Actions
-
Set VariableSet ClosestUnit = PickedUnit
-
Set VariableSet ShortestDistance = (Distance between DummyBuilding and UnitLocation)
-
Unit - Order PickedUnit to Human Peasant - Repair (Constructing structure)
-
Custom script: call RemoveLocation(udg_UnitLocation)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_DummyBuilding)
-
-
-
Acolyte BarrackP1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Repair (Human)
-
(Unit-type of (Target unit of ability being cast)) Equal to Barrack
-
-
Actions
-
Unit - Remove (Target unit of ability being cast) from the game
-
Set VariableSet RemovedBuilding = (Position of (Target unit of ability being cast))
-
Unit - Create 1 dummy acolyte for (Owner of (Casting unit)) at RemovedBuilding facing Default building facing degrees
-
Unit - Order (Last created unit) to build a Barack Dummy at RemovedBuilding
-
Unit - Add a 1 second Generic expiration timer to (Last created unit)
-
Custom script: call RemoveLocation( udg_RemovedBuilding)
-
-
-
Acolyte BarrackP2
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
(Unit-type of (Constructing structure)) Equal to Barack Dummy
-
-
Actions
-
Wait 1.50 seconds
-
Set VariableSet ClosestUnit = No unit
-
Set VariableSet ShortestDistance = 900000.00
-
Set VariableSet DummyBuilding = (Position of (Constructing structure))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 375.00 of DummyBuilding matching ((((Matching unit) is alive) Equal to Vrai) and ((Unit-type of (Matching unit)) Equal to Acolyte)).) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
Set VariableSet UnitLocation = (Position of PickedUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Equal to (Order(stand down))
-
(Distance between DummyBuilding and UnitLocation) Less than ShortestDistance
-
-
Then - Actions
-
Set VariableSet ClosestUnit = PickedUnit
-
Set VariableSet ShortestDistance = (Distance between DummyBuilding and UnitLocation)
-
Unit - Order PickedUnit to Human Peasant - Repair (Constructing structure)
-
Custom script: call RemoveLocation(udg_UnitLocation)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_DummyBuilding)
-
-
-
Acolyte BarrackP0
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
(Unit-type of (Constructing structure)) Equal to Barrack
-
-
Actions
-
Set VariableSet CR = 1
-
-
-
Acolyte BarrackP05
-
Events
-
Time - Every 1.50 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CR Equal to 1
-
-
Then - Actions
-
Set VariableSet ClosestUnit = No unit
-
Set VariableSet ShortestDistance = 900000.00
-
Set VariableSet DummyBuilding = (Position of (Constructing structure))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 375.00 of DummyBuilding matching ((((Matching unit) is alive) Equal to Vrai) and ((Unit-type of (Matching unit)) Equal to Acolyte)).) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
Set VariableSet UnitLocation = (Position of PickedUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Equal to (Order(stand down))
-
(Distance between DummyBuilding and UnitLocation) Less than ShortestDistance
-
-
Then - Actions
-
Set VariableSet ClosestUnit = PickedUnit
-
Set VariableSet ShortestDistance = (Distance between DummyBuilding and UnitLocation)
-
Unit - Order PickedUnit to Human Peasant - Repair (Constructing structure)
-
Custom script: call RemoveLocation(udg_UnitLocation)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_DummyBuilding)
-
Set VariableSet CR = 0
-
-
Else - Actions
-
-
-
-
Acolyte BarrackP1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Repair (Human)
-
(Unit-type of (Target unit of ability being cast)) Equal to Barrack
-
-
Actions
-
Unit - Remove (Target unit of ability being cast) from the game
-
Set VariableSet RemovedBuilding = (Position of (Target unit of ability being cast))
-
Unit - Create 1 dummy acolyte for (Owner of (Casting unit)) at RemovedBuilding facing Default building facing degrees
-
Unit - Order (Last created unit) to build a Barack Dummy at RemovedBuilding
-
Unit - Add a 1 second Generic expiration timer to (Last created unit)
-
Custom script: call RemoveLocation( udg_RemovedBuilding)
-
-
-
Acolyte BarrackP2
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
(Unit-type of (Constructing structure)) Equal to Barack Dummy
-
-
Actions
-
Set VariableSet CDR = 1
-
-
-
Acolyte BarrackP25
-
Events
-
Time - Every 1.50 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CDR Equal to 1
-
-
Then - Actions
-
Set VariableSet ClosestUnit = No unit
-
Set VariableSet ShortestDistance = 900000.00
-
Set VariableSet DummyBuilding = (Position of (Constructing structure))
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 375.00 of DummyBuilding matching ((((Matching unit) is alive) Equal to Vrai) and ((Unit-type of (Matching unit)) Equal to Acolyte)).) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
Set VariableSet UnitLocation = (Position of PickedUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of (Picked unit)) Equal to (Order(stand down))
-
(Distance between DummyBuilding and UnitLocation) Less than ShortestDistance
-
-
Then - Actions
-
Set VariableSet ClosestUnit = PickedUnit
-
Set VariableSet ShortestDistance = (Distance between DummyBuilding and UnitLocation)
-
Unit - Order PickedUnit to Human Peasant - Repair (Constructing structure)
-
Custom script: call RemoveLocation(udg_UnitLocation)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_DummyBuilding)
-
Set VariableSet CDR = 0
-
-
Else - Actions
-
-
-
Last edited: