Hi,
In condition of spwaner trigger, with event timer, is it possible to make if for only player1 action == true execute action or if for only player2 action == true execute other action.
Now all players spawn units at the end of timer, but, if i want make for example p1 spwan = timer, p2 spawn = timer +25.0 ec.. for make one wave 2 player (p1 vs p4), second wave (p2 vs p5) and finally wave (p3 vs p6); after all reset all and restart p1 vs p4, p2 vs p5 and p3 vs p6.
In timer event ivent the player activator, and i dont know how to refer to a single player for do it.
Hope my very bad english it is comprensible, or i retry to explain
Break it down into ticks where each tick corresponds to two players (one from each team) spawning. To do this, raise the frequency of the trigger to that of the desired spawn interval (eg if it is every 60 seconds then make it every 20 seconds as 60/3 = 20). Then make a local integer array of size 2.
Inside the integer array you put the players you want to spawn for. To get this you have a counter that increments 1 each tick and is bounded between 1 and 3 with wrap around. You make the player in the local array at position 0 equal to that counter. The player at position 1 is then the counter + 3. A for loop is then used to run through the array. Each iteration then performs the spawning actions except on a group of units made from the spawner unit group filtered for a specific player.
An alternative would be to extend the spawner group to an array of size 6. When a unit is made you add it to the group at the owner's index. You can then skip the group filter step as you already have filtered groups (slightly more efficient).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
oh, u are semple the best! if u are near me, now, i offer to you, lot of beers, thx very much again!
Hi, In condition of spwaner trigger, with event timer, is it possible to make if for only player1 action == true execute action or if for only player2 action == true execute other action.
Now all players spawn units at the end of timer, but, if i want make for example p1 spwan = timer, p2 spawn = timer +25.0 ec.. for make one wave 2 player (p1 vs p4), second wave (p2 vs p5) and finally wave (p3 vs p6); after all reset all and restart p1 vs p4, p2 vs p5 and p3 vs p6.
In timer event ivent the player activator, and i dont know how to refer to a single player for do it.
Hope my very bad english it is comprensible, or i retry to explain
@gbau: Go
Break it down into ticks where each tick corresponds to two players (one from each team) spawning. To do this, raise the frequency of the trigger to that of the desired spawn interval (eg if it is every 60 seconds then make it every 20 seconds as 60/3 = 20). Then make a local integer array of size 2.
Inside the integer array you put the players you want to spawn for. To get this you have a counter that increments 1 each tick and is bounded between 1 and 3 with wrap around. You make the player in the local array at position 0 equal to that counter. The player at position 1 is then the counter + 3. A for loop is then used to run through the array. Each iteration then performs the spawning actions except on a group of units made from the spawner unit group filtered for a specific player.
An alternative would be to extend the spawner group to an array of size 6. When a unit is made you add it to the group at the owner's index. You can then skip the group filter step as you already have filtered groups (slightly more efficient).