Why doesnt this trigger work?

Quauhtli

I have the right to remain silent.
Reaction score
62
How come this doesn't work?
Code:
ColorChange P2
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Unit - Change color of (Triggering unit) to Brown
                    Else - Actions
                        Do nothing

I have this trigger for every player...
but it only works for player 1 (well, actually i dont know, since red is already red, and changing red to red wel...)
 

Potatisbil

New Member
Reaction score
6
I think you should use picked unit instead of triggering unit. Never knew that "Map initialization" was counted as a triggering unit XD

~Potatisbil
 

R@d14nc3

New Member
Reaction score
49
Leaks. ;)
Add:
Custom script: set bj_wantDestroyGroup = true

Won't leak after that.
 

Quauhtli

I have the right to remain silent.
Reaction score
62
it looks like this now:
Code:
ColorChange P2
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Picked unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Unit - Change color of (Triggering unit) to Brown
                        Custom script:   set bj_wantDestroyGroup = true
                    Else - Actions
                        Do nothing
still nothing works
 

R@d14nc3

New Member
Reaction score
49
Code:
ColorChange P2
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                [B]Custom script:   set bj_wantDestroyGroup = true[/B]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Picked unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Unit - Change color of ([B]Picked unit[/B]) to Brown
                                            Else - Actions
                        Do nothing

fixed :)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The custom script line needs to come before the loop, not somewhere inside.

And, if you pick every unit in "units owned by player" you don't need the test anymore.


"Do nothing" is not needed. It isn't doing anything anyway.
 

Quauhtli

I have the right to remain silent.
Reaction score
62
thx

it worked
but:
on the minimap they still give player color

how to change?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top