- Joined
- Oct 27, 2016
- Messages
- 34
So I've gone over this trigger a few times, and all seems in order. However, for some reason, the trigger keeps picking structures (based on the Blacksmith) as non-structures and treating them as such. Is this particular system broken (as the World Editor often just is) or am I missing some logic? I am sick as all hell, so I wouldn't be COMPLETELY surprised if I was just missing something.
For context, this trigger is meant to pick every unit owned by Player Brown, except for heroes and structures. Then, it's supposed to pick between increasing the unit's custom value, or removing the unit entirely if the custom value is at a certain level. So far, the system seems to work perfectly, with the NOTABLE exception that it is counting STRUCTURES as units. I am going to experiment with moving the condition to the actual conditions area instead of putting it in the Pick Action and see if that works, but I'd still like to know why this isn't working.
EDIT2: Solved in first reply! I'll leave this up in case anyone else can benefit from it!
For context, this trigger is meant to pick every unit owned by Player Brown, except for heroes and structures. Then, it's supposed to pick between increasing the unit's custom value, or removing the unit entirely if the custom value is at a certain level. So far, the system seems to work perfectly, with the NOTABLE exception that it is counting STRUCTURES as units. I am going to experiment with moving the condition to the actual conditions area instead of putting it in the Pick Action and see if that works, but I'd still like to know why this isn't working.
-
DespawnControl
-
Events
-
Time - Every 10.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units owned by Player 12 (Brown) matching (((Picked unit) is A structure) Equal to False)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A Hero) Equal to False
-
(Custom value of (Picked unit)) Greater than or equal to 8
-
-
Then - Actions
-
Unit - Remove (Picked unit) from the game
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Items\ResourceItems\ResourceEffectTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
-
-
-
-
-
Unit Group - Pick every unit in (Units owned by Player 12 (Brown) matching (((Triggering unit) is A Hero) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Set the custom value of (Picked unit) to 0
-
-
-
-
EDIT2: Solved in first reply! I'll leave this up in case anyone else can benefit from it!
Last edited: