Trigger error - unit group

Yizzy

New Member
Reaction score
20
Hi, I've been working on an arena map, though I dosen't seem to get the following trigger to work:
Code:
Initialization
    Events
        Map initialization
    Conditions
    Actions
        (...)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                ((Picked player) slot status) Equal to Is playing
                                ((Picked player) controller) Equal to User
                    Then - Actions
                        Set NrOfPlayers = (NrOfPlayers + 1)
                        (...)
                    Else - Actions
                        Set TempGroup = (Units owned by (Picked player) matching (((Matching unit) is A structure) Equal to False))
                        Unit Group - Pick every unit in TempGroup and do (Actions)
                            Loop - Actions
                                Unit - Remove (Picked unit) from the game
                        Custom script:   call DestroyGroup (udg_TempGroup)
        (...)
The NrOfPlayers (int), seem to generate the correct number but the units aren't removed.

Any ideas?
 

CaptDeath

New Member
Reaction score
103
green is good red not so good teal is comments
Code:
[COLOR="Lime"]Initialization
    Events
        Map initialization
    Conditions
    Actions
        (...)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                ((Picked player) slot status) Equal to Is playing
                                ((Picked player) controller) Equal to User
                    Then - Actions
                        Set NrOfPlayers = (NrOfPlayers + 1)
                        (...)[/COLOR]
                   [COLOR="Cyan"]dont u need to pick the "players" that arent playing then u do they remove stepps[/COLOR][COLOR="Red"] Else - Actions
                        Set TempGroup = (Units owned by (Picked player) matching [/COLOR](((Matching unit) is A structure) Equal to False))
                        Unit Group - Pick every unit in TempGroup and do (Actions)
                            Loop - Actions
                                Unit - Remove (Picked unit) from the game
                        Custom script:   call DestroyGroup (udg_TempGroup)
        (...)
 

Romek

Super Moderator
Reaction score
964
green is good red not so good teal is comments
Code:
[COLOR="Lime"]Initialization
    Events
        Map initialization
    Conditions
    Actions
        (...)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                ((Picked player) slot status) Equal to Is playing
                                ((Picked player) controller) Equal to User
                    Then - Actions
                        Set NrOfPlayers = (NrOfPlayers + 1)
                        (...)[/COLOR]
                   [COLOR="Cyan"]dont u need to pick the "players" that arent playing then u do they remove stepps[/COLOR][COLOR="Red"] Else - Actions
                        Set TempGroup = (Units owned by (Picked player) matching [/COLOR](((Matching unit) is A structure) Equal to False))
                        Unit Group - Pick every unit in TempGroup and do (Actions)
                            Loop - Actions
                                Unit - Remove (Picked unit) from the game
                        Custom script:   call DestroyGroup (udg_TempGroup)
        (...)
I can't read a thing in that trigger. (Except the red).
The colours are too light.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top