ButtonBitState()
Return true if the button_bit(s) indicated are pressed (note: there is no way to know exactly which buttons are pressed on the client, since everything is remapped into these bit values)
Signature
<player> ButtonBitState(<button>)
Called on an entity: player ButtonBitState(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| button | Required | name of button to check "BUTTON_BIT_ATTACK" for example, optionally can include as many button names as desired. Returns true if all buttons indicated are true. |
Example (from Treyarch's docs)
if ( self ButtonBitState( "BUTTON_BIT_ATTACK") ) ...
Notes
You really shouldn't be using this, unless you KNOW that you should. See buttonbits.h for button bit names.
Real uses in BO3's scripts
Not called anywhere in BO3's shipped scripts, so check it works in your mode before relying on it.
Related built-ins
- SetElectrifiedState()Sets the player into the electrified state for 3rd person anim purposes.
- GetLightingState()Gets the current lighting state for the player
- GetPlayerMovementState()Returns the player movement state for the match record.
- GetMinBitCountForNum()Returns the minimum number of bits needed to express the provided integer
- SetZBarrierPieceState()Set's the state of the piece indexed in the zbarrier ent.
- GetZBarrierPieceState()Returns the state of the piece indexed in the zbarrier ent.
- Objective_State()Set a state for the objective
- SetLoopState()Set pitch and volume per entity/alias
- IsInScriptedState()Checks if actor is in a scripted state (animscripted, custom, negotiation)
- GetZBarrierPieceIndicesInState()Returns an array of integer indices of the zbarriers pieces that are in the specified state.
- GetHeliDamageState()Returns the damage state of the heli.
- Obituary()Create an obituary for a character
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).