- Joined
- Mar 24, 2013
- Messages
- 1,105
I'm trying to check for which player has the most points at the end of the game, TotalPoints is an integer array, and the index on the array corresponds to the players GUI player number. I could do more of what I have below but it will be a huge block for no reason and I know it could be much less code but I can't figure how I would use For Each Int from 1 to 11, or some faster/shorter way. Thanks for any help.
-
End
-
Events
- Time - GameTimer expires
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TotalPoints[1] Greater than TotalPoints[2]
- TotalPoints[1] Greater than TotalPoints[3]
- TotalPoints[1] Greater than TotalPoints[4]
- TotalPoints[1] Greater than TotalPoints[5]
- TotalPoints[1] Greater than TotalPoints[6]
- TotalPoints[1] Greater than TotalPoints[7]
- TotalPoints[1] Greater than TotalPoints[8]
- TotalPoints[1] Greater than TotalPoints[9]
- TotalPoints[1] Greater than TotalPoints[10]
- TotalPoints[1] Greater than TotalPoints[11]
-
Then - Actions
- Game - Display to (All players) the text: ((playerColors[1] + (RealNames[1] + colorEnd)) + has won!!!!)
- Skip remaining actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TotalPoints[2] Greater than TotalPoints[1]
- TotalPoints[2] Greater than TotalPoints[3]
- TotalPoints[2] Greater than TotalPoints[4]
- TotalPoints[2] Greater than TotalPoints[5]
- TotalPoints[2] Greater than TotalPoints[6]
- TotalPoints[2] Greater than TotalPoints[7]
- TotalPoints[2] Greater than TotalPoints[8]
- TotalPoints[2] Greater than TotalPoints[9]
- TotalPoints[2] Greater than TotalPoints[10]
- TotalPoints[2] Greater than TotalPoints[11]
-
Then - Actions
- Game - Display to (All players) the text: ((playerColors[2] + (RealNames[2] + colorEnd)) + has won!!!!)
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited by a moderator: