How do you check if a player is active?
I want to check if player 1 and so on is active or was never there from the beginning or left the game and do actions based on that.
It doesn't seem to work with
(Controller of Player 1) == User
nor with
(Status of Player 1) == Playing
for my TD I want to spawn enemies in the corner of active players only.
With the first ((Controller of Player 1) == User) it works for player 1 but not for players 2-8.
Uhm ((Controller of Player X) == User) will ONLY be true when this player is a human. Maybe that's your problem? I've quickly tested it for player 1 and 2 and it worked in both cases.
I can't test ((Status of Player 1) == Playing) since I don't have anyone to test it with though.
yeah with ((Controller of Player 1) == User) i've tested it with a second player.
for me it spawned a builder as usual and the waves were coming aswell but second player got nothing that is linked to the condition.
I'll upload the map maybe someone can spot the error.
(i know there are probably alot of other flaws in it. I'm still a real noob in creating own maps :P)
The map you uploaded contains an error. I'm getting a e_array underflow the moment the first wave is supposed to start (that's because the Current Waves is at -1 for the first wave, but Wave Types[-1] doesn't exist).
Apart from that it works just fine o0 units spawn only for me, after I fixed this error. I've added some debug messages and they tell me that the game considers Player 2 through 8 as not-active, whereas only me (p 1) is active.
PS: And that's what ProxyTooMuch said, too. Your giant trigger will only work until it found the first player that's active.
Just try to read the construct and it should be obvious:
If the first player is active, then do some stuff for him. ELSE (that means only if the first player ISNT active) check if player two is active. If he is active, then do some stuff for him, else check if player 3 is active.
Make sure each of the ((Controller of Player 1) == User) is in a separate if statement.
From the looks of it, you just have one gigantic if/elseif/elseif/elseif/elseif chain, which means when the first statement returns true the rest of it will get skipped over.
How do you check if a player is active?
I want to check if player 1 and so on is active or was never there from the beginning or left the game and do actions based on that.
It doesn't seem to work with
(Controller of Player 1) == User
nor with
(Status of Player 1) == Playing
for my TD I want to spawn enemies in the corner of active players only.
With the first ((Controller of Player 1) == User) it works for player 1 but not for players 2-8.
Are you sure that these two functions don't work?
Uhm ((Controller of Player X) == User) will ONLY be true when this player is a human. Maybe that's your problem? I've quickly tested it for player 1 and 2 and it worked in both cases.
I can't test ((Status of Player 1) == Playing) since I don't have anyone to test it with though.
yeah with ((Controller of Player 1) == User) i've tested it with a second player.
for me it spawned a builder as usual and the waves were coming aswell but second player got nothing that is linked to the condition.
I'll upload the map maybe someone can spot the error.
(i know there are probably alot of other flaws in it. I'm still a real noob in creating own maps :P)
The map you uploaded contains an error. I'm getting a e_array underflow the moment the first wave is supposed to start (that's because the Current Waves is at -1 for the first wave, but Wave Types[-1] doesn't exist).
Apart from that it works just fine o0 units spawn only for me, after I fixed this error. I've added some debug messages and they tell me that the game considers Player 2 through 8 as not-active, whereas only me (p 1) is active.
PS: And that's what ProxyTooMuch said, too. Your giant trigger will only work until it found the first player that's active.
Just try to read the construct and it should be obvious:
If the first player is active, then do some stuff for him. ELSE (that means only if the first player ISNT active) check if player two is active. If he is active, then do some stuff for him, else check if player 3 is active.
@Fropper: Go
Make sure each of the ((Controller of Player 1) == User) is in a separate if statement.
From the looks of it, you just have one gigantic if/elseif/elseif/elseif/elseif chain, which means when the first statement returns true the rest of it will get skipped over.
thanks both of you :)
forgot that i had set Wave Types[-1] , did it because wave 25 didn't spawned for me but so it did
and with the separate if statements it works :)