Class: CGameObject
Base client-side game object.
Source
src/xrGame/base_client_classes_script.cpp, CGameObject binding.
Custom Constructor
CGameObject
Remarks
Client-side object state is engine-owned. The binding exposes low-level lifecycle hooks used by custom client subclasses; ordinary gameplay scripts usually work with the higher-level game_object wrapper instead.
Extends
Extended by
CMosquitoBaldCTorchCTorridZoneCRadioactiveZoneCMincerCFractureCHairsZoneCAmebaZoneCNoGravityZoneCArtefactCEntityAliveCActorCCustomMonsterCInventoryOwnerCInventoryItemCZombieCControllerCTushkanoCBurerCCatCChimeraCPoltergeistCPseudoGigantCPsyDogCPsyDogPhantomCAI_BloodsuckerCAI_BoarCAI_DogCAI_FleshCAI_PseudoDogCAI_StalkerCAI_TraderCSnorkCAntiradCStalkerOutfitCInventoryBoxCBottleItemCFoodItemCMedkitCExplosiveItemCGrenadeLauncherCWeaponAmmoCSilencerCScopeCRGD5CF1CPdaCSimpleDetectorCAdvancedDetectorCEliteDetectorCScientificDetectorCZoneCampfireCPhysicObjecthanging_lampCCarCHelicopterCSpaceRestrictorCLevelChangersmart_cover_object
Constructors
Constructor
protected new CGameObject(): CGameObject;Engine-created base object.
Returns
CGameObject
Inherited from
Methods
_construct()
_construct(): DLL_Pure;Construct engine-side object state.
Returns
Constructed base object.
Remarks
Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.
getEnabled()
getEnabled(): boolean;Returns
boolean
Whether the object is enabled in the client object loop.
getVisible()
getVisible(): boolean;Returns
boolean
Whether the object is visible.
net_Export()
net_Export(net_packet: net_packet): void;Export network state to a packet.
Parameters
| Parameter | Type | Description |
|---|---|---|
net_packet | net_packet | Destination network packet. |
Returns
void
net_Import()
net_Import(net_packet: net_packet): void;Import network state from a packet.
Parameters
| Parameter | Type | Description |
|---|---|---|
net_packet | net_packet | Source network packet. |
Returns
void
net_Spawn()
net_Spawn(cse_abstract: cse_abstract): boolean;Spawn the client object from its server object.
Parameters
| Parameter | Type | Description |
|---|---|---|
cse_abstract | cse_abstract | Server object used for spawn data. |
Returns
boolean
Whether spawn succeeded.
Remarks
Lifecycle hook used during network spawn. Return false to reject spawn in custom subclasses.
use()
use(object: CGameObject): boolean;Use another object through the engine interaction path.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | CGameObject | Object being used. |
Returns
boolean
Whether the use action was handled.
Visual()
Visual(): IXR_IRender_Visual;Returns
Render visual assigned to the object.
Properties
__name
readonly __name: string;LuaBind instance constructor name.
Inherited from
__name
readonly static __name: string;LuaBind class constructor name.