- 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 :
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
Here is the overall trigger :
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!
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
------------------- 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
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
-
((Picked player) slot status) Not equal to Is playing
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 --------
-
-
Help me please! I reward with +rep!