• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger disables all stuns

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 25
Joined
Jan 29, 2010
Messages
2,018

Sunken City

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]
 
Hello spasorc

for auto-movement system let me suggest you diffrent way to do that

1.add 'Ward' status to unit, this will disable UI for player
2.still "smart" order /right click/ is possible so you have to re-order your unit
3.detect "smart" order and <add unit to group and run 0sec timer>
4.on 2nd trigger where timer expires reorder unit and remove from group

if you got indexer in map you can use coordinates to attack to, for each separate unit
1.set 2 global real array variables
2.on unit creation set this vars like: udg_TargetX[custValueOfYourUnit]=yourXLoc, and for Y simillar. Use can use hundreds diffrent locations:)).
3. reorder using this variables

zibi
 
Hello spasorc

for auto-movement system let me suggest you diffrent way to do that

1.add 'Ward' status to unit, this will disable UI for player
2.still "smart" order /right click/ is possible so you have to re-order your unit
3.detect "smart" order and <add unit to group and run 0sec timer>
4.on 2nd trigger where timer expires reorder unit and remove from group

if you got indexer in map you can use coordinates to attack to, for each separate unit
1.set 2 global real array variables
2.on unit creation set this vars like: udg_TargetX[custValueOfYourUnit]=yourXLoc, and for Y simillar. Use can use hundreds diffrent locations:)).
3. reorder using this variables

zibi

Thanks man! Your system no longer provokes the issue!
For future readers information:
-I already had the Ward classification set up.
-I am not using an indexing group.
-I used the following triggers, as suggested by Zibi:

[trigger=""]Movement 1
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
(Issued order) Equal to (Order(smart))
((Triggering unit) is A structure) Equal to False
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
Unit Group - Add (Triggering unit) to Movement_Group
Countdown Timer - Start MovementTimer as a Repeating timer that will expire in 0.00 seconds
[/trigger]

[trigger=""]Movement 2
Events
Time - MovementTimer expires
Conditions
Actions
Unit Group - Pick every unit in Movement_Group 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
(Owner of (Picked unit)) Equal to Player 1 (Red)
(Owner of (Picked unit)) Equal to Player 2 (Blue)
(Owner of (Picked unit)) Equal to Player 3 (Teal)
(Owner of (Picked unit)) Equal to Player 4 (Purple)
Then - Actions
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Picked unit) to Attack-Move To AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Unit Group - Remove (Picked unit) from Movement_Group
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 (Picked unit)) Equal to Player 7 (Green)
(Owner of (Picked unit)) Equal to Player 8 (Pink)
(Owner of (Picked unit)) Equal to Player 9 (Gray)
(Owner of (Picked unit)) Equal to Player 10 (Light Blue)
Then - Actions
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Picked unit) to Attack-Move To AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Unit Group - Remove (Picked unit) from Movement_Group
Else - Actions
[/trigger]
 
Status
Not open for further replies.
Back
Top