• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with picking unused players in a trigger.

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hello! I have a problem with... see the topic.
So, my problem is slightly connected with multiboards. See now. I set the number of rows to be equal to the number of players playing. If i only play, the number of rows is 1. If i play with a friend, the rows are 2. However, i have two multiboards, one for the first team, one for the second. So when i have to change the value of a column for a player, i have to get the row that player takes, right. If all the five players from the first team (or the second) play, it's easy - i just get their player number, it should be equal to the row.
And here comes the...

BUT...

if one of the players is not there, let's say player 3, and if i get the rows for the players this way, there will be a bug. Because i will not be able to change value of the column in the player 5 row, due to the fact that there are only 4 rows, not five. I already said that i create rows, equal to the number of players play. So, i created the following system in which i store the row that a player must be in in an array integer variable. The array represents the player number. And if a player is not playing, the following happens :

Players playing : 1, 2, 3, 4, 5
------------------- v- v- v- v- v
Player's row : -> 1, 2, 3, 4, 5

Players playing : 1, X, 3, 4, 5
------------------- v- v- v- v- v
Player's row : -> 1, 0, 2, 3, 4

Players playing : 1, X, 3, X, 5
------------------- v- v- v- v- v
Player's row : -> 1, 0, 2, 0, 3
What it does is decrease the row number of the players with bigger player number than the one that is not playing by 1. AND IT ACTUALLY WORKS.

Perhaps you are thinking : "Is there something he will actually ask, DAMN!"

Well, here it is. The problem : i cant get the players who don't play. Even if i play alone, the thing doesn't work... how can i get the players who don't play? The players that have status "Open" or "Closed"? I tried with
  • ((Picked player) slot status) Equal to Is unused
and
  • ((Picked player) slot status) Not equal to Is playing
but nothing happened...
Here is the overall trigger :
  • Multiboards
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- PLAYER ROWS --------
      • Set MultiboardsPlayerRows[1] = 1
      • Set MultiboardsPlayerRows[2] = 2
      • Set MultiboardsPlayerRows[3] = 3
      • Set MultiboardsPlayerRows[4] = 4
      • Set MultiboardsPlayerRows[5] = 5
      • Set MultiboardsPlayerRows[7] = 1
      • Set MultiboardsPlayerRows[8] = 2
      • Set MultiboardsPlayerRows[9] = 3
      • Set MultiboardsPlayerRows[10] = 4
      • Set MultiboardsPlayerRows[11] = 5
      • 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
              • ((Picked player) slot status) Equal to Is unused
            • Then - Actions
              • Player Group - Add (Picked player) to MultiboardsWhoPlays
            • Else - Actions
      • Player Group - Pick every player in MultiboardsWhoPlays and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of (Picked player)) Less than or equal to 5
            • Then - Actions
              • Set MultiboardPlayerNumber = (Player number of (Picked player))
              • For each (Integer A) from (MultiboardPlayerNumber + 1) to 5, do (Actions)
                • Loop - Actions
                  • Set MultiboardsPlayerRows[(Integer A)] = (MultiboardsPlayerRows[(Integer A)] - 1)
              • Set MultiboardsPlayerRows[MultiboardPlayerNumber] = 0
            • Else - Actions
              • Set MultiboardPlayerNumber = (Player number of (Picked player))
              • For each (Integer A) from (MultiboardPlayerNumber + 1) to 11, do (Actions)
                • Loop - Actions
                  • Set MultiboardsPlayerRows[(Integer A)] = (MultiboardsPlayerRows[(Integer A)] - 1)
              • Set MultiboardsPlayerRows[MultiboardPlayerNumber] = 0
      • For each (Integer A) from 1 to 11, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(MultiboardsPlayerRows[(Integer A)]))
      • -------- PLAYER ROWS --------
Players 6 and 12 are computers. They are just ally for the teams. Player 6 is ally for team 1, player 12 is ally for team 2. I don't want them in the multiboards.
Help me please! I reward with +rep!
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I would suggest you use Players 11 and 12 as computers, and 1-10 as players. After that, assing them to the teams based on the player index. Create a Temp Player Group with all the Player matching (User) and (Is Playing), then assign them based on the player index to Team1 or Team2 (If Player number is less than 6, it's team 1, else, it's team 2).

1. Create the Teams.
2. Index the Players (Player 1, 3, 5, 7, 9, 10 would be Player[1, 2, 3, 4, 5, 6]). For this you "Pick every player in TempPlayerGroup and Set Player[i+1] = (Picked Player)"
3. Create the multiboards with as many rows as players are in each team
4. Update the Multiboard using Player[Integer A]
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Oh, thanks! I made it. It works now but... kinda "in half". Now it picks the right players and everything is ok. I tried my map (not from the "Test Map" option in WE) and set some computers to play on my side (i removed the Player Matching [User] condition and turned it on again after the test) and everything was ok. But after i tested again, from the other team this time, i wasn't added to the multiboard. The multiboard it's self is created, but i'm not in it. I also put the action that displays the row number for each player and when i was from team 1 with computers it was like this :
1
2
0
3
4

0
0
0
0
0
When i was team 2, this appeared
0
0
0
0
0

0
0
0
0
0
Here is the trigger :
  • Multiboards
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- COLORS --------
      • Set MultiboardColors[1] = |c00FF0303
      • Set MultiboardColors[2] = |c000042FF
      • Set MultiboardColors[3] = |c001CE6B9
      • Set MultiboardColors[4] = |c00540081
      • Set MultiboardColors[5] = |c00FFFC01
      • Set MultiboardColors[6] = |c00fEBA0E
      • Set MultiboardColors[7] = |c0020C000
      • Set MultiboardColors[8] = |c00E55BB0
      • Set MultiboardColors[9] = |c00959697
      • Set MultiboardColors[10] = |c007EBFF1
      • -------- COLORS --------
      • -------- ---------- --------
      • -------- PLAYER ROWS --------
      • 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
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Player number of (Picked player)) Greater than 5
                • Then - Actions
                  • Player Group - Add (Picked player) to Teams[2]
                • Else - Actions
                  • Player Group - Add (Picked player) to Teams[1]
            • Else - Actions
      • Set MultiboardRowEqualation = 0
      • Player Group - Pick every player in Teams[2] and do (Actions)
        • Loop - Actions
          • Set MultiboardRowEqualation = (MultiboardRowEqualation + 1)
          • Set MultiboardsPlayerRows[(Player number of (Picked player))] = MultiboardRowEqualation
      • Set MultiboardRowEqualation = 0
      • Player Group - Pick every player in Teams[1] and do (Actions)
        • Loop - Actions
          • Set MultiboardRowEqualation = (MultiboardRowEqualation + 1)
          • Set MultiboardsPlayerRows[(Player number of (Picked player))] = MultiboardRowEqualation
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(MultiboardsPlayerRows[(Integer A)]))
      • -------- PLAYER ROWS --------
      • Multiboard - Create a multiboard with 5 columns and 1 rows, titled (Southwest team score + ( -- + (String(OverallScore[1]))))
      • Set Multiboards[1] = (Last created multiboard)
      • Set PlayersInTeam = 0
      • Player Group - Pick every player in Teams[1] and do (Actions)
        • Loop - Actions
          • Set PlayersInTeam = (PlayersInTeam + 1)
          • Multiboard - Change the number of rows for Multiboards[1] to PlayersInTeam
          • Multiboard - Set the width for Multiboards[1] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to 15.00% of the total screen width
          • Multiboard - Set the width for Multiboards[1] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboards[1] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboards[1] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to 3.10% of the total screen width
          • Multiboard - Set the width for Multiboards[1] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to 2.80% of the total screen width
          • Multiboard - Set the text for Multiboards[1] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to (MultiboardColors[(Player number of (Picked player))] + (Name of (Picked player)))
          • Multiboard - Set the text for Multiboards[1] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(PlayerScore[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboards[1] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to Alive
          • Multiboard - Set the text for Multiboards[1] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(MultiboardPlayerKills[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboards[1] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(MultiboardPlayerDeaths[(Player number of (Picked player))]))
          • Multiboard - Set the icon for Multiboards[1] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
          • Multiboard - Set the icon for Multiboards[1] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNDeathPact.blp
          • Multiboard - Set the icon for Multiboards[1] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNCloakOfFlames.blp
          • Multiboard - Set the icon for Multiboards[1] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNArcaniteMelee.blp
          • Multiboard - Set the icon for Multiboards[1] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNUndeadShrine.blp
      • Multiboard - Create a multiboard with 5 columns and 1 rows, titled (Northeast team score + ( -- + (String(OverallScore[2]))))
      • Set Multiboards[2] = (Last created multiboard)
      • Set PlayersInTeam = 0
      • Player Group - Pick every player in Teams[2] and do (Actions)
        • Loop - Actions
          • Set PlayersInTeam = (PlayersInTeam + 1)
          • Multiboard - Change the number of rows for Multiboards[2] to PlayersInTeam
          • Multiboard - Set the width for Multiboards[2] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to 15.00% of the total screen width
          • Multiboard - Set the width for Multiboards[2] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboards[2] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboards[2] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to 3.10% of the total screen width
          • Multiboard - Set the width for Multiboards[2] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to 2.80% of the total screen width
          • Multiboard - Set the text for Multiboards[2] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to (MultiboardColors[(Player number of (Picked player))] + (Name of (Picked player)))
          • Multiboard - Set the text for Multiboards[2] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(PlayerScore[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboards[2] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to Alive
          • Multiboard - Set the text for Multiboards[2] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(MultiboardPlayerKills[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboards[2] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to (String(MultiboardPlayerDeaths[(Player number of (Picked player))]))
          • Multiboard - Set the icon for Multiboards[2] item in column 1, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
          • Multiboard - Set the icon for Multiboards[2] item in column 2, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNDeathPact.blp
          • Multiboard - Set the icon for Multiboards[2] item in column 3, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNCloakOfFlames.blp
          • Multiboard - Set the icon for Multiboards[2] item in column 4, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNArcaniteMelee.blp
          • Multiboard - Set the icon for Multiboards[2] item in column 5, row MultiboardsPlayerRows[(Player number of (Picked player))] to ReplaceableTextures\CommandButtons\BTNUndeadShrine.blp
      • Custom script: if IsPlayerInForce(GetLocalPlayer(),udg_Teams[1]) then
      • Multiboard - Hide Multiboards[2]
      • Multiboard - Show Multiboards[1]
      • Custom script: endif
      • Custom script: if IsPlayerInForce(GetLocalPlayer(),udg_Teams[2]) then
      • Multiboard - Hide Multiboards[1]
      • Multiboard - Show Multiboards[2]
      • Custom script: endif
I've been looking at the trigger for 1 hour and checked EVERYTHING! The two teams (Teams[1] and Teams[2]) HAVE THE SAME ACTIONS. They are just filled with different players. Damn. Help me, please.. :vw_wtf::goblin_jawdrop::goblin_boom::ogre_rage::eekani:
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
EDIT: Sorry. I made a mistake. I'm taking a look at it.

Improvement Points:

· You are doing REPETITIVE CALLINGS. This means using (Picked Player) over and over. Same happens with (Player Number of (Picked Player), and everything else. Do this: declare the thing you're going to use over and over, and use it in the variable.
· You're using a PlayerGroup array. Don't. Use 2 Player Group variables instead. Arrays takes much more space, and isn't needed in this case. I'm not sure, but I think there's a bug with Player Group variables Arrays, since they're not initializet automatically, as other variables.
· You're using a Mutliboard Array, but not really making use of the array, just to difference them. I would create NorthBoard and SouthBoard. Arrays takes more memory space.

I did the changes and it should work. I think the problem was on the Teams[2] not being initialized.

  • Multiboards
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- COLORS --------
      • Set MultiboardColors[1] = |c00FF0303
      • Set MultiboardColors[2] = |c000042FF
      • Set MultiboardColors[3] = |c001CE6B9
      • Set MultiboardColors[4] = |c00540081
      • Set MultiboardColors[5] = |c00FFFC01
      • Set MultiboardColors[6] = |c00fEBA0E
      • Set MultiboardColors[7] = |c0020C000
      • Set MultiboardColors[8] = |c00E55BB0
      • Set MultiboardColors[9] = |c00959697
      • Set MultiboardColors[10] = |c007EBFF1
      • -------- COLORS --------
      • -------- ---------- --------
      • -------- PLAYER ROWS --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set p = (Picked Player)
          • Set i = (Player number of p)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (p slot status) Equal to Is playing
              • (p controller) Equal to User
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • i Greater than 5
                • Then - Actions
                  • Player Group - Add p to Team2
                • Else - Actions
                  • Player Group - Add p to Team1
            • Else - Actions
        • Set MultiboardRowEqualation = 0
        • Player Group - Pick every player in Team1 and do (Actions)
          • Loop - Actions
            • Set MultiboardRowEqualation = (MultiboardRowEqualation + 1)
            • Set MultiboardsPlayerRows[i] = MultiboardRowEqualation
        • Set MultiboardRowEqualation = 0
        • Player Group - Pick every player in Team2 and do (Actions)
          • Loop - Actions
            • Set MultiboardRowEqualation = (MultiboardRowEqualation + 1)
            • Set MultiboardsPlayerRows[i] = MultiboardRowEqualation
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(MultiboardsPlayerRows[(Integer A)]))
      • -------- PLAYER ROWS --------
      • Multiboard - Create a multiboard with 5 columns and 1 rows, titled (Southwest team score + ( -- + (String(OverallScore[1]))))
      • Set NorthBoard = (Last created multiboard)
      • Set PlayersInTeam = (Number of Players in Team1)
      • Player Group - Pick every player in Team1 and do (Actions)
      • Multiboard - Change the number of rows for NorthBoard to PlayersInTeam
        • Loop - Actions
          • Set p = (Picked Player)
          • Set i = (Player number of p)
          • Multiboard - Set the width for NorthBoard item in column 1, row MultiboardsPlayerRows[i] to 15.00% of the total screen width
          • Multiboard - Set the width for NorthBoard item in column 2, row MultiboardsPlayerRows[i] to 6.00% of the total screen width
          • Multiboard - Set the width for NorthBoard item in column 3, row MultiboardsPlayerRows[i] to 6.00% of the total screen width
          • Multiboard - Set the width for NorthBoard item in column 4, row MultiboardsPlayerRows[i] to 3.10% of the total screen width
          • Multiboard - Set the width for NorthBoard item in column 5, row MultiboardsPlayerRows[i] to 2.80% of the total screen width
          • Multiboard - Set the text for NorthBoard item in column 1, row MultiboardsPlayerRows[i] to (MultiboardColors[(Player number of (Picked player))] + (Name of p))
          • Multiboard - Set the text for NorthBoard item in column 2, row MultiboardsPlayerRows[i] to (String(PlayerScore[(Player number of (Picked player))]))
          • Multiboard - Set the text for NorthBoard item in column 3, row MultiboardsPlayerRows[i] to Alive
          • Multiboard - Set the text for NorthBoard item in column 4, row MultiboardsPlayerRows[i] to (String(MultiboardPlayerKills[(Player number of (Picked player))]))
          • Multiboard - Set the text for NorthBoard item in column 5, row MultiboardsPlayerRows[i] to (String(MultiboardPlayerDeaths[(Player number of (Picked player))]))
          • Multiboard - Set the icon for NorthBoard item in column 1, row MultiboardsPlayerRows[i] to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
          • Multiboard - Set the icon for NorthBoard item in column 2, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNDeathPact.blp
          • Multiboard - Set the icon for NorthBoard item in column 3, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNCloakOfFlames.blp
          • Multiboard - Set the icon for NorthBoard item in column 4, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNArcaniteMelee.blp
          • Multiboard - Set the icon for NorthBoard item in column 5, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNUndeadShrine.blp
      • Multiboard - Create a multiboard with 5 columns and 1 rows, titled (Northeast team score + ( -- + (String(OverallScore[2]))))
      • Set SouthBoard = (Last created multiboard)
      • Set PlayersInTeam = (Number of Players in Team2)
      • Multiboard - Change the number of rows for SouthBoard to PlayersInTeam
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • Set p = (Picked Player)
          • Set i = (Player number of p)
          • Multiboard - Set the width for SouthBoard item in column 1, row MultiboardsPlayerRows[i] to 15.00% of the total screen width
          • Multiboard - Set the width for SouthBoard] item in column 2, row MultiboardsPlayerRows[i] to 6.00% of the total screen width
          • Multiboard - Set the width for SouthBoard item in column 3, row MultiboardsPlayerRows[i] to 6.00% of the total screen width
          • Multiboard - Set the width for SouthBoard item in column 4, row MultiboardsPlayerRows[i] to 3.10% of the total screen width
          • Multiboard - Set the width for SouthBoard item in column 5, row MultiboardsPlayerRows[i] to 2.80% of the total screen width
          • Multiboard - Set the text for SouthBoard item in column 1, row MultiboardsPlayerRows[i] to (MultiboardColors[(Player number of (Picked player))] + (Name of (Picked player)))
          • Multiboard - Set the text for SouthBoard item in column 2, row MultiboardsPlayerRows[i] to (String(PlayerScore[(Player number of (Picked player))]))
          • Multiboard - Set the text for SouthBoard item in column 3, row MultiboardsPlayerRows[i] to Alive
          • Multiboard - Set the text for SouthBoard item in column 4, row MultiboardsPlayerRows[i] to (String(MultiboardPlayerKills[(Player number of (Picked player))]))
          • Multiboard - Set the text for SouthBoard item in column 5, row MultiboardsPlayerRows[(] to (String(MultiboardPlayerDeaths[(Player number of (Picked player))]))
          • Multiboard - Set the icon for SouthBoard item in column 1, row MultiboardsPlayerRows[i] to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
          • Multiboard - Set the icon for SouthBoard item in column 2, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNDeathPact.blp
          • Multiboard - Set the icon for SouthBoard item in column 3, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNCloakOfFlames.blp
          • Multiboard - Set the icon for SouthBoard item in column 4, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNArcaniteMelee.blp
          • Multiboard - Set the icon for SouthBoard item in column 5, row MultiboardsPlayerRows[i] to ReplaceableTextures\CommandButtons\BTNUndeadShrine.blp
      • Custom script: if IsPlayerInForce(GetLocalPlayer(),udg_Team1) then
      • Multiboard - Hide SouthBoard
      • Multiboard - Show NorthBoard
      • Custom script: endif
      • Custom script: if IsPlayerInForce(GetLocalPlayer(),udg_Team2) then
      • Multiboard - Hide NorthBoard
      • Multiboard - Show SouthBoard
      • Custom script: endif
 
Last edited:
Level 14
Joined
Aug 8, 2010
Messages
1,022
EDIT: Sorry. I made a mistake. I'm taking a look at it.

Improvement Points:

· You are doing REPETITIVE CALLINGS. This means using (Picked Player) over and over. Same happens with (Player Number of (Picked Player), and everything else. Do this: declare the thing you're going to use over and over, and use it in the variable.
· You're using a PlayerGroup array. Don't. Use 2 Player Group variables instead. Arrays takes much more space, and isn't needed in this case. I'm not sure, but I think there's a bug with Player Group variables Arrays, since they're not initializet automatically, as other variables.
· You're using a Mutliboard Array, but not really making use of the array, just to difference them. I would create NorthBoard and SouthBoard. Arrays takes more memory space.

I did the changes and it should work. I think the problem was on the Teams[2] not being initialized.
Thanks for telling me about the repetitive callings. :) I didn't knew about this. I also thought that using Player Group arrays is not good too... i'll change the things you listed and try again. Hope it works.

EDIT : JESUS CHRIST, MOTHER OF A BABY JESUS! THE SH*T WORKS NOW! THANKS Spartipilo, YOU RULE! I'LL ASK JESUS TO PROMOTE YOU TO "GOD" AND BRING GOOD THINGS TO THIS PLANET! The player group array explained why i had problems with other triggers using them. Thanks, man! For everything! +rep!
 
Last edited:
Status
Not open for further replies.
Top