| 02-24-2009, 06:48 PM | #2 |
I'm assuming you meant to change each color to the player's respective color? In your sample code they were all set to red. Unfortunately GUI doens't have switchcase statements which would make things like this a lot easier, so instead you just have to copy paste 12 similar if/then/elses. Trigger: blah
![]() Events
![]() Conditions
![]() Actions
![]() ![]() For each (Integer A) from 1 to 12, do (Actions)
![]() ![]() ![]() Loop - Actions
![]() ![]() ![]() ![]() If ((Integer A) Equal to 1) then do (Multiboard - Set the color for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (100.00%, 0.00%, 0.00%) with 0.00% transparency) else do (Do nothing)
![]() ![]() ![]() ![]() If ((Integer A) Equal to 2) then do (Multiboard - Set the color for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (0.00%, 0.00%, 100.00%) with 0.00% transparency) else do (Do nothing)
![]() ![]() ![]() ![]() Etc. |
| 02-24-2009, 06:52 PM | #3 | |
Quote:
The example was meant to give just a 1/12 of all the work (since writing all of that would be an enormous waste of space). For your answer: (slap in the face) Why I ALWAYS get the most complicated way? Thanks. + Rep incoming. EDIT: Just found out that my multiboard trigger isn't flexible enough (because player number is variable in this map) to use a solution like ShadowWolf's, so (AAGGHH!) I have to use the big bunch of code. |
| 02-24-2009, 07:53 PM | #4 |
What do you mean, player number is variable? You're not using fixed player settings? If you elaborate, I still may be able to assist you. |
| 02-24-2009, 08:20 PM | #5 | |
Quote:
The number varies from 2 to 4 players, and also the players are variable (2 players can be player 3 and 4, or player 1 and 3 etc.), and with this also the row position of a player's name. I guess I just found out something that may help me in this (to avoid too much doubling): Trigger: ![]() -Player 1![]() If (all conditions are True) then do (Then Actions) else do (Else Actions)![]() -Player 2etcetera. For every next player, the row will have a new variable depending on other players' slot statuses (ex: player 3's row will be "2 + RedInGame + BlueInGame"). That's still a great bunch of work, but a little thinner (I guess using "For each" etc. has unfortunately no purpose here, like no one can have "Pick Every Player") |
| 02-24-2009, 09:43 PM | #6 |
Oh, mentioning that there were only four players would have made things easier. The lazy but easiest way to do it would be to have it always set items 2-5 to their respective colors, the way I initially showed you, but check if each player is playing, and if that player isn't playing, then change that player's name on the multiboard to <Not Playing> or something like that. This method requires you to check "Fixed Player Settings" in Force Properties. In perspective, Player 1 is always Red, Player 2 is always Blue, etc. It would make things a lot easier on you unless you really want people to be able to pick whatever color they want while being a specific player number. |
| 02-24-2009, 09:57 PM | #7 | |
Quote:
Unfortunately, I started modifying the trigger today from something very similar to this, (red for 1, blue for 2 etc.) (exception for items always 2-5) so I think I won't turn back now since I modified 50+% of the trigger now. It's a great bunch of (almost) useless code, but it seems to work (for now). Thanks anyway for the interest (without your aid today probably I wouldn't have thought about the pair of variables that now are shortening my code (and saving my life XD)) |
