GSC reference › Built-in
CalcPlayerOptions()
Built-in (engine)
Server
Player Called on: player
Calculate player options
Signature
<player> CalcPlayerOptions(<custom class slot>)
Called on an entity: player CalcPlayerOptions(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| custom class slot | Required | The custom class slot |
Example (from Treyarch's docs)
playerRenderOptions = self CalcPlayerOptions( class_num )
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/mp/gametypes/_loadout.gsc, line 1093
playerrenderoptions = self calcplayeroptions(self.class_num); - scripts/cp/gametypes/_loadout.gsc, line 719
playerrenderoptions = self calcplayeroptions(class_num);
Related built-ins
- SetPlayerRenderOptions()Sets the player render options
- GetTopPlayersBodyRenderOptions()Returns the render options for the body for the top player in the game by index
- GetTopPlayersHelmetRenderOptions()Returns the render options for the body for the top player in the game by index
- GetTopPlayersWeaponRenderOptions()Returns the render options for the weapon for the top player in the game by index
- GetPlayerAngles()Get the player view angles
- SetPlayerAngles()Set the player's view angles
- PlayerADS()Gets the player weapon position fraction
- CalcWeaponOptions()Calculates weapon options
- GetPlayerCameraPos()Get the player's camera position
- IsPlayerOnSameMachine()Returns whether or not this player is on the same machine as the other player.
- RevivePlayer()Callback from script to get player out of last stand, increases health, removes damage timer, should clear screen of damageFX
- GetCharacterBodyRenderOptions()Gets the body render options for this player
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).