GSC reference › Built-in
IsStruct()
Built-in (engine)
Server + client
Utility
Checks whether this variable is a struct object
Signature
IsStruct(<variable>)
Parameters
| Name | Required? | Details |
|---|---|---|
| variable | Required | variable that may or may not be a struct |
Example (from Treyarch's docs)
if ( isstruct(self)) ...
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
- SpawnStruct()
- MarkDestructibleDestroyed()Set destructible destroyed
- DisableDestructiblePieces()Disables all destructible pieces that have this label set in the destructible gdt
- EnableAllDestructiblePieces()Enables all destructible pieces that were previously disabled
- GetSpawnStructForCharacter()Returns the targetname of the script_struct to use for the character pose in the frontend
- ResetDestructible()Resets the destructible entity back to its start state
- array()Create an array
- Assert()Assert that the given statement is correct.
- GetDvarInt()Gets the value of a dvar.
- IsArray()Checks whether this entity/variable is an array
- GetDvarString()Gets the value of a dvar.
- ArrayRemoveValue()Remove a value from an array (may affect multiple indexes)
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).