HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TowerWars Win Trigger doesn't work

12-23-2004, 07:02 PM#1
oNdizZ
Now The things in red is for player 1 red, then its 5 almost identical more for player 2 - 6. This trigger just wont work, I've tried to play against a comp, kill it and then run a test trigger which should(!) show me the "winning player", but that var. is never defined. So there is some stupid little error which i cannot detect.
Please if anyone of you can help, give it a shot :)

Thanks on advance...


Code:
Win Real
    [color=Red]Events
        Time - Every 3.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Defeated[1] Equal to False
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        TeamPlay Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                And - All (Conditions) are true
                                    Conditions
                                        Defeated[4] Equal to True
                                        Defeated[5] Equal to True
                                        Defeated[6] Equal to True
                            Then - Actions
                                Player Group - Add Player 1 (Red) to WinningPlayer_Team
                                Player Group - Add Player 2 (Blue) to WinningPlayer_Team
                                Player Group - Add Player 3 (Teal) to WinningPlayer_Team
                                Trigger - Run trigger it <gen> (checking conditions)
                                Trigger - Turn off (This trigger)
                                Skip remaining actions
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Defeated[2] Equal to True
                                        Defeated[3] Equal to True
                                        Defeated[4] Equal to True
                                        Defeated[5] Equal to True
                                        Defeated[6] Equal to True
                                    Then - Actions
                                        Set WinningPlayer = Player 1 (Red)
                                        Trigger - Run trigger it <gen> (checking conditions)
                                        Trigger - Turn off (This trigger)
                                        Skip remaining actions
                                    Else - Actions
                    Else - Actions
            Else - Actions[/color]
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Defeated[2] Equal to False
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                TeamPlay Equal to True
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        And - All (Conditions) are true
                                            Conditions
                                                Defeated[4] Equal to True
                                                Defeated[5] Equal to True
                                                Defeated[6] Equal to True
                                    Then - Actions
                                        Player Group - Add Player 1 (Red) to WinningPlayer_Team
                                        Player Group - Add Player 2 (Blue) to WinningPlayer_Team
                                        Player Group - Add Player 3 (Teal) to WinningPlayer_Team
                                        Trigger - Run trigger it <gen> (checking conditions)
                                        Trigger - Turn off (This trigger)
                                        Skip remaining actions
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Defeated[1] Equal to True
                                                Defeated[3] Equal to True
                                                Defeated[4] Equal to True
                                                Defeated[5] Equal to True
                                                Defeated[6] Equal to True
                                            Then - Actions
                                                Set WinningPlayer = Player 2 (Blue)
                                                Trigger - Run trigger it <gen> (checking conditions)
                                                Trigger - Turn off (This trigger)
                                                Skip remaining actions
                                            Else - Actions
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Defeated[3] Equal to False
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        TeamPlay Equal to True
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                And - All (Conditions) are true
                                                    Conditions
                                                        Defeated[4] Equal to True
                                                        Defeated[5] Equal to True
                                                        Defeated[6] Equal to True
                                            Then - Actions
                                                Player Group - Add Player 1 (Red) to WinningPlayer_Team
                                                Player Group - Add Player 2 (Blue) to WinningPlayer_Team
                                                Player Group - Add Player 3 (Teal) to WinningPlayer_Team
                                                Trigger - Run trigger it <gen> (checking conditions)
                                                Trigger - Turn off (This trigger)
                                                Skip remaining actions
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Defeated[1] Equal to True
                                                        Defeated[2] Equal to True
                                                        Defeated[4] Equal to True
                                                        Defeated[5] Equal to True
                                                        Defeated[6] Equal to True
                                                    Then - Actions
                                                        Set WinningPlayer = Player 3 (Teal)
                                                        Trigger - Run trigger it <gen> (checking conditions)
                                                        Trigger - Turn off (This trigger)
                                                        Skip remaining actions
                                                    Else - Actions
                                    Else - Actions
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Defeated[4] Equal to False
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                TeamPlay Equal to True
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        And - All (Conditions) are true
                                                            Conditions
                                                                Defeated[1] Equal to True
                                                                Defeated[2] Equal to True
                                                                Defeated[3] Equal to True
                                                    Then - Actions
                                                        Player Group - Add Player 4 (Purple) to WinningPlayer_Team
                                                        Player Group - Add Player 5 (Yellow) to WinningPlayer_Team
                                                        Player Group - Add Player 6 (Orange) to WinningPlayer_Team
                                                        Trigger - Run trigger it <gen> (checking conditions)
                                                        Trigger - Turn off (This trigger)
                                                        Skip remaining actions
                                                    Else - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                Defeated[1] Equal to True
                                                                Defeated[2] Equal to True
                                                                Defeated[3] Equal to True
                                                                Defeated[5] Equal to True
                                                                Defeated[6] Equal to True
                                                            Then - Actions
                                                                Set WinningPlayer = Player 4 (Purple)
                                                                Trigger - Run trigger it <gen> (checking conditions)
                                                                Trigger - Turn off (This trigger)
                                                                Skip remaining actions
                                                            Else - Actions
                                            Else - Actions
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Defeated[5] Equal to False
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        TeamPlay Equal to True
                                                    Then - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                And - All (Conditions) are true
                                                                    Conditions
                                                                        Defeated[1] Equal to True
                                                                        Defeated[2] Equal to True
                                                                        Defeated[3] Equal to True
                                                            Then - Actions
                                                                Player Group - Add Player 4 (Purple) to WinningPlayer_Team
                                                                Player Group - Add Player 5 (Yellow) to WinningPlayer_Team
                                                                Player Group - Add Player 6 (Orange) to WinningPlayer_Team
                                                                Trigger - Run trigger it <gen> (checking conditions)
                                                                Trigger - Turn off (This trigger)
                                                                Skip remaining actions
                                                            Else - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        Defeated[1] Equal to True
                                                                        Defeated[2] Equal to True
                                                                        Defeated[3] Equal to True
                                                                        Defeated[4] Equal to True
                                                                        Defeated[6] Equal to True
                                                                    Then - Actions
                                                                        Set WinningPlayer = Player 5 (Yellow)
                                                                        Trigger - Run trigger it <gen> (checking conditions)
                                                                        Trigger - Turn off (This trigger)
                                                                        Skip remaining actions
                                                                    Else - Actions
                                                    Else - Actions
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Defeated[6] Equal to False
                                                    Then - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                TeamPlay Equal to True
                                                            Then - Actions
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        And - All (Conditions) are true
                                                                            Conditions
                                                                                Defeated[1] Equal to True
                                                                                Defeated[2] Equal to True
                                                                                Defeated[3] Equal to True
                                                                    Then - Actions
                                                                        Player Group - Add Player 4 (Purple) to WinningPlayer_Team
                                                                        Player Group - Add Player 5 (Yellow) to WinningPlayer_Team
                                                                        Player Group - Add Player 6 (Orange) to WinningPlayer_Team
                                                                        Trigger - Run trigger it <gen> (checking conditions)
                                                                        Trigger - Turn off (This trigger)
                                                                        Skip remaining actions
                                                                    Else - Actions
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            If - Conditions
                                                                                Defeated[1] Equal to True
                                                                                Defeated[2] Equal to True
                                                                                Defeated[3] Equal to True
                                                                                Defeated[4] Equal to True
                                                                                Defeated[5] Equal to True
                                                                            Then - Actions
                                                                                Set WinningPlayer = Player 6 (Orange)
                                                                                Trigger - Run trigger it <gen> (checking conditions)
                                                                                Trigger - Turn off (This trigger)
                                                                                Skip remaining actions
                                                                            Else - Actions
                                                            Else - Actions
                                                    Else - Actions
12-30-2004, 10:01 PM#2
oNdizZ
hmm, can any moderator close this, i've found the bug and fixed it.
it was that i've put these 3 triggers in the wrong "else"

Set WinningPlayer = Player 1 (Red)
Trigger - Run trigger it <gen> (checking conditions)
Trigger - Turn off (This trigger)
Skip remaining actions

I've putted them in a "else place" so that it first looks if the game is free for all or teamplay, and then it checks if all members in team 2 is defeated, and if they were it checks if all other players (except red) is defeated and then if they are, red is winning.
so if i played versus 3 comps who was in player 4, 5 and 6's slot and if they all died then i would have won on single player :/

anyway it's fixed so you can close this now =) (not that it needed it anyway)