HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with trigger a problem

11-22-2003, 04:12 PM#1
HyperNox
I have got a problem with some triggers that worked fine but then something happend.
I don't know what and all of a sudden all slot statuses seem to have flipped out ingame but only afeter a player leaves, like my money share system and share units system.
The full unitshare flipped like a player got control over all units on the map including neutral units and the share money system resets my gold and lumber to 0 all the time.

Have anyone had this problem?
anyone knows how to fix this?
here is the trigger:
Code:
Player Drops
    Events
        Time - Every 10.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                -------- leaves --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Is_Playing[(Integer A)] Equal to True
                        ((Player((Integer A))) slot status) Equal to Has left the game
                    Then - Actions
                        Game - Display to (All players) the text: ((|cffffff00 + (Name of (Player((Integer A))))) + |r has surrendered)
                        Set Is_Playing[(Integer A)] = False
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Player((Integer A))) slot status) Equal to Has left the game
                                ((Player((Integer A))) is an ally of Player 11 (Dark Green)) Equal to True
                            Then - Actions
                                Set Players_in_team[1] = (Players_in_team[1] - 1)
                                Unit - Create 1 Player's Soul for (Player((Integer A))) at (Center of A Hero Select <gen>) facing Default building facing degrees
                                Player Group - Make (Player group((Player((Integer A))))) treat (All allies of Player 11 (Dark Green)) as an Ally with shared vision and full shared units
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Player((Integer A))) slot status) Equal to Has left the game
                                ((Player((Integer A))) is an ally of Player 12 (Brown)) Equal to True
                            Then - Actions
                                Set Players_in_team[2] = (Players_in_team[2] - 1)
                                Unit - Create 1 Player's Soul for (Player((Integer A))) at (Center of L Hero Select <gen>) facing Default building facing degrees
                                Player Group - Make (Player group((Player((Integer A))))) treat (All allies of Player 12 (Brown)) as an Ally with shared vision and full shared units
                            Else - Actions
                    Else - Actions
                        Do nothing
                -------- Money Sharing --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Is_Playing[(Integer A)] Equal to False
                        ((Player((Integer A))) slot status) Equal to Has left the game
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Player((Integer A))) is an ally of Player 11 (Dark Green)) Equal to True
                            Then - Actions
                                For each (Integer B) from 1 to 5, do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Player((Integer B))) slot status) Equal to Is playing
                                            Then - Actions
                                                Player - Add (((Player((Integer A))) Current gold) / Players_in_team[1]) to (Player((Integer B))) Current gold
                                                Player - Add (((Player((Integer A))) Current gold) / Players_in_team[1]) to (Player((Integer B))) Current lumber
                                            Else - Actions
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Player((Integer A))) is an ally of Player 12 (Brown)) Equal to True
                            Then - Actions
                                For each (Integer B) from 6 to 10, do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Player((Integer B))) slot status) Equal to Is playing
                                            Then - Actions
                                                Player - Add (((Player((Integer A))) Current gold) / Players_in_team[1]) to (Player((Integer B))) Current gold
                                                Player - Add (((Player((Integer A))) Current gold) / Players_in_team[1]) to (Player((Integer B))) Current lumber
                                            Else - Actions
                            Else - Actions
                        Player - Set (Player((Integer A))) Current gold to 0
                        Player - Set (Player((Integer A))) Current lumber to 0
                    Else - Actions