18.07.2011, 13:44
Quote:
This could be accomplished by offsetting the players position with sin and cos variables (with changing the angle too). That way you're not just restricted to the x and y axis.
pawn Code:
- The random( 360) will add a random value to the angle, so it spawns at a different direction from the player - The random( 10 ) will add a random value from the player, so they'll be at different distances, not always 5, or whatever - If you would like a constant distance from the player, exchange random( 10 ) with the number of units you desire - You could place this code under some type of timer |
But i have 1 more question, i have 2 teams (lets say, TEAM_A and TEAM_B)
now i want the objects only spawn RANDOM players in team A, so i could use random(MAX_PLAYERS) but thats for all and i need to make it select the players in team_a.