- Joined
- Jun 27, 2010
- Messages
- 2,707
How to count number of computer players and set this number to a integer variable?
Try this:
- Actions
- Set count = 0
- For each (Integer loopInt) from 1 to 12, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Player(loopInt)) controller) Equal to Computer
- Then - Actions
- Set count = (count + 1)
- Else - Actions
Question invalid.
You know variables, but don't know how to explore with possible functions?
Inadmissible. All you ask are the most obvious.
Even someone newer than you would guess the inefficient but easier player function.
You even asked 'How to know if an integer variable is equal to 0'
when that is the first integer comparison GUI function.
Is that a question or some kind of shared information?If I Put message in the end the number will be 12.
Depends where you put it.If I Put message in the end the number will be 12.
- Game - Display to (All players) the text: (String(loopInt))
What you have to set up is the integer variable - in the trigger I posted that variable would be called loopIntFor each (integer variable) from X to Y do (Actions)