Skip to content

Class: CBastArtefact ​

Client object binding for CBastArtefact artefacts.

Source ​

src/xrGame/artefact_script.cpp, CBastArtefact binding.

Custom Constructor ​

CBastArtefact

Extends ​

Constructors ​

Constructor ​

ts
new CBastArtefact(): CBastArtefact;

Create an artefact object wrapper.

Returns ​

CBastArtefact

Inherited from ​

CArtefact.constructor

Methods ​

_construct() ​

ts
_construct(): DLL_Pure;

Construct engine-side object state.

Returns ​

DLL_Pure

Constructed base object.

Remarks ​

Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.

Inherited from ​

CArtefact._construct


FollowByPath() ​

ts
FollowByPath(
   path_name: string, 
   point_index: number, 
   position: vector): void;

Move the artefact detector helper along a patrol path.

Parameters ​

ParameterTypeDescription
path_namestringPatrol path name.
point_indexnumberStarting path point index.
positionvectorMovement force used by detector support.

Returns ​

void

Remarks ​

Native code delegates to detector support when it exists. Missing detector support makes this a no-op. The vector parameter is stored as movement force, not as an initial world position.

Inherited from ​

CArtefact.FollowByPath


GetAfRank() ​

ts
GetAfRank(): number;

Returns ​

number

Artefact rank used by detectors and inventory UI.

Inherited from ​

CArtefact.GetAfRank


getEnabled() ​

ts
getEnabled(): boolean;

Returns ​

boolean

Whether the object is enabled in the client object loop.

Inherited from ​

CArtefact.getEnabled


getVisible() ​

ts
getVisible(): boolean;

Returns ​

boolean

Whether the object is visible.

Inherited from ​

CArtefact.getVisible


net_Export() ​

ts
net_Export(net_packet: net_packet): void;

Export network state to a packet.

Parameters ​

ParameterTypeDescription
net_packetnet_packetDestination network packet.

Returns ​

void

Inherited from ​

CArtefact.net_Export


net_Import() ​

ts
net_Import(net_packet: net_packet): void;

Import network state from a packet.

Parameters ​

ParameterTypeDescription
net_packetnet_packetSource network packet.

Returns ​

void

Inherited from ​

CArtefact.net_Import


net_Spawn() ​

ts
net_Spawn(cse_abstract: cse_abstract): boolean;

Spawn the client object from its server object.

Parameters ​

ParameterTypeDescription
cse_abstractcse_abstractServer 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.

Inherited from ​

CArtefact.net_Spawn


SwitchVisibility() ​

ts
SwitchVisibility(is_visible: boolean): void;

Show or hide the artefact detector helper.

Parameters ​

ParameterTypeDescription
is_visiblebooleanNew visibility state.

Returns ​

void

Remarks ​

Native code delegates to detector support when it exists. Missing detector support makes this a no-op; it does not spawn or destroy the artefact object.

Inherited from ​

CArtefact.SwitchVisibility


use() ​

ts
use(object: CGameObject): boolean;

Use another object through the engine interaction path.

Parameters ​

ParameterTypeDescription
objectCGameObjectObject being used.

Returns ​

boolean

Whether the use action was handled.

Inherited from ​

CArtefact.use


Visual() ​

ts
Visual(): IXR_IRender_Visual;

Returns ​

IXR_IRender_Visual

Render visual assigned to the object.

Inherited from ​

CArtefact.Visual

Properties ​

__name ​

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from ​

CArtefact.__name


__name ​

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from ​

CArtefact.__name