CRole.CreateSpawnBracket
Creates a spawn bracket for a the bracket spawn system.
Syntax
CRole.CreateSpawnBracket lower_bound upper_bound amount_to_spawn
Returns
reference to SpawnBracket object
Arguments
| Name | Required | Type | Description |
|---|---|---|---|
lower bound | Yes | A whole number bigger or equal 0 | The amount of players from which this bracket applies. |
upper bound | Yes | A whole number bigger or equal 0 | The amount of players until which this bracket applies. |
amount to spawn | Yes | A whole number bigger or equal 0 | The amount of players that will be spawned in this bracket. |
Details
Example: If you define a bracket with lower bound 3 and upper bound 5, and amount to spawn 2, then if there are 3 to 5 players that can be converted to a custom role, then 2 of them will be converted. If the players available to convert exceed the range of 3 to 5, then this bracket is ignored.
Possible errors
- The lower bound is greater than the upper bound.
- The amount to spawn is greater than the smallest amount of players available to convert.
On a running server
Use serhelp CRole.CreateSpawnBracket to inspect the reference generated by your installed SER version.