I am having a hard trying to figure out how to iterate through the active players on each team.
i have an array of size 2 that stores the next players turn but wondering how to find that number.
ie timer runs for 30 seconds and each time it runs only have 1 player spawn
player 1, to player 2 to player 3 , if a player leaves or only starts with a certain number of players how to make sure it stays with active players
Thank you
Humbrol
found a answer to rotate through the 3 active players i have on team 1, i use a variable named team1turn[1]
this rotates/ iterates through all the active user players on the team for the spawn.
SpawnTeam1
Events
Local Variables
Conditions
Actions
------- Team 1's spawn worker
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Team1Turn[1]) == User
Then
------- spawn info here
Math - Cycle Team1Turn[1] from 1 through 3
Else
Math - Cycle Team1Turn[1] from 1 through 3
Trigger - Run SpawnTeam1 (Check Conditions, Don't Wait until it finishes)
I'd like to help but I totally don't understand what you're asking... Why do you require a variable with the array size 2 for just storing Who's turn is next?
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
every time the trigger runs <every 30 seconds> only 1 player from each teams units spawn. so id store which players turn is the next spawn. having trouble figuring out how to iterate and store the next active player or loop back to the first active player on the team if the last player is reached.
found an answer that works, what do you guys think?
this is just the part to spawn team 1s. there is a variable named Team1Turn[1] that stores whos turn it is to spawn next.
SpawnTeam1
Events
Local Variables
Conditions
Actions
------- Team 1's spawn worker
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Team1Turn[1]) == User
Then
------- spawn info here
Math - Cycle Team1Turn[1] from 1 through 3
Else
Math - Cycle Team1Turn[1] from 1 through 3
Trigger - Run SpawnTeam1 (Check Conditions, Don't Wait until it finishes)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am having a hard trying to figure out how to iterate through the active players on each team.
i have an array of size 2 that stores the next players turn but wondering how to find that number.
ie timer runs for 30 seconds and each time it runs only have 1 player spawn
player 1, to player 2 to player 3 , if a player leaves or only starts with a certain number of players how to make sure it stays with active players
Thank you
Humbrol
found a answer to rotate through the 3 active players i have on team 1, i use a variable named team1turn[1]
this rotates/ iterates through all the active user players on the team for the spawn.
SpawnTeam1
Events
Local Variables
Conditions
Actions
------- Team 1's spawn worker
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Team1Turn[1]) == User
Then
------- spawn info here
Math - Cycle Team1Turn[1] from 1 through 3
Else
Math - Cycle Team1Turn[1] from 1 through 3
Trigger - Run SpawnTeam1 (Check Conditions, Don't Wait until it finishes)
I'd like to help but I totally don't understand what you're asking... Why do you require a variable with the array size 2 for just storing Who's turn is next?
every time the trigger runs <every 30 seconds> only 1 player from each teams units spawn. so id store which players turn is the next spawn. having trouble figuring out how to iterate and store the next active player or loop back to the first active player on the team if the last player is reached.
did
if 1 <= playerturn[0] <= 3
and playerturn[0] == user
then
spawn
playerturn[0] = playerturn[0]+1
else
playerturn[0] = 1
but tryng to figure out how to solve if player 1 or 2 leave game
found an answer that works, what do you guys think?
this is just the part to spawn team 1s. there is a variable named Team1Turn[1] that stores whos turn it is to spawn next.
SpawnTeam1
Events
Local Variables
Conditions
Actions
------- Team 1's spawn worker
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Team1Turn[1]) == User
Then
------- spawn info here
Math - Cycle Team1Turn[1] from 1 through 3
Else
Math - Cycle Team1Turn[1] from 1 through 3
Trigger - Run SpawnTeam1 (Check Conditions, Don't Wait until it finishes)