SpasMaster
Hosted Project: SC
- Joined
- Jan 29, 2010
- Messages
- 1,994
Hello, Hive.
I have been working on my new project which features an auto-movement system: player owned units cannot be given any orders by the player and constantly attack-move towards the enemy base. However, a problem appeared. I have noticed that units seem to ignore stuns. I made a War Stomp ability, which applies it's debuff (stun), but the affected unit still continues to move, attack, etc. Disabling the system gets rid of this problem. I have tried using a condition that checks if a unit has the stun debuff in order to skip all system actions, but it did nothing.
Posting the system below:
[trigger=""]Uncontrollable Movement
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
((Triggering unit) is A structure) Equal to False
(Issued order) Not equal to (Order(bloodlust))
(Issued order) Not equal to (Order(parasite))
(Issued order) Not equal to (Order(berserk))
And - All (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Not equal to Dummy Worker
(Unit-type of (Triggering unit)) Not equal to Dummy (Generic uses)
(Unit-type of (Triggering unit)) Not equal to Dummy (Supply)
(Unit-type of (Triggering unit)) Not equal to Chaos Builder
(Unit-type of (Triggering unit)) Not equal to Elf Builder
(Unit-type of (Triggering unit)) Not equal to Human Builder
(Unit-type of (Triggering unit)) Not equal to Mechanical Builder
(Unit-type of (Triggering unit)) Not equal to Naga Builder
(Unit-type of (Triggering unit)) Not equal to Night Elf Builder
(Unit-type of (Triggering unit)) Not equal to Northern Builder
(Unit-type of (Triggering unit)) Not equal to Undead Builder
(Unit-type of (Triggering unit)) Not equal to Orc Builder
(Unit-type of (Triggering unit)) Not equal to Corrupted Builder
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitOrdered Equal to 0
Then - Actions
Set UnitOrdered = 1
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Attack-Move To AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Set UnitOrdered = 0
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitOrdered Equal to 0
Then - Actions
Set UnitOrdered = 1
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Attack-Move To AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Set UnitOrdered = 0
Else - Actions
Else - Actions
[/trigger]
I have been working on my new project which features an auto-movement system: player owned units cannot be given any orders by the player and constantly attack-move towards the enemy base. However, a problem appeared. I have noticed that units seem to ignore stuns. I made a War Stomp ability, which applies it's debuff (stun), but the affected unit still continues to move, attack, etc. Disabling the system gets rid of this problem. I have tried using a condition that checks if a unit has the stun debuff in order to skip all system actions, but it did nothing.
Posting the system below:
[trigger=""]Uncontrollable Movement
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
((Triggering unit) is A structure) Equal to False
(Issued order) Not equal to (Order(bloodlust))
(Issued order) Not equal to (Order(parasite))
(Issued order) Not equal to (Order(berserk))
And - All (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Not equal to Dummy Worker
(Unit-type of (Triggering unit)) Not equal to Dummy (Generic uses)
(Unit-type of (Triggering unit)) Not equal to Dummy (Supply)
(Unit-type of (Triggering unit)) Not equal to Chaos Builder
(Unit-type of (Triggering unit)) Not equal to Elf Builder
(Unit-type of (Triggering unit)) Not equal to Human Builder
(Unit-type of (Triggering unit)) Not equal to Mechanical Builder
(Unit-type of (Triggering unit)) Not equal to Naga Builder
(Unit-type of (Triggering unit)) Not equal to Night Elf Builder
(Unit-type of (Triggering unit)) Not equal to Northern Builder
(Unit-type of (Triggering unit)) Not equal to Undead Builder
(Unit-type of (Triggering unit)) Not equal to Orc Builder
(Unit-type of (Triggering unit)) Not equal to Corrupted Builder
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitOrdered Equal to 0
Then - Actions
Set UnitOrdered = 1
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Attack-Move To AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Set UnitOrdered = 0
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitOrdered Equal to 0
Then - Actions
Set UnitOrdered = 1
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Attack-Move To AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Set UnitOrdered = 0
Else - Actions
Else - Actions
[/trigger]