Skip to end of metadata
Go to start of metadata

DeleteThis

Deletes this entity.

Syntax
Entity.DeleteThis()

CreateRenderProxy

Create a proxy render object for the entity, allows entity to be rendered without loading any assets in immediately.

Syntax
Entity.CreateRenderProxy()

CheckShaderParamCallbacks

Check all the currently set shader param callbacks on the renderproxy with the current state of the entity.

Syntax
Entity.UpdateShaderParamCallback()

LoadObject

Load CGF geometry into the entity slot.

Syntax
Entity.LoadObject( nSlot, sFilename )
ParameterDescription
nSlotSlot identifier.
sFilenameCGF geometry file name.

LoadObjectWithFlags

Load CGF geometry into the entity slot.

Syntax
Entity.LoadObject( nSlot, sFilename, nFlags )
ParameterDescription
nSlotSlot identifier.
sFilenameCGF geometry file name.
nFlagsentity load flags

LoadObjectLattice

Load lattice into the entity slot.

Syntax
Entity.LoadObjectLattice( nSlot )

LoadSubObject

Load geometry of one CGF node into the entity slot.

Syntax
Entity.LoadSubObject( nSlot, sFilename, sGeomName )
ParameterDescription
nSlotSlot identifier.
sFilenameCGF geometry file name.
sGeomNameName of the node inside CGF geometry.

LoadCharacter

Load CGF geometry into the entity slot.

Syntax
Entity.LoadCharacter( nSlot, sFilename )
ParameterDescription
nSlotSlot identifier.
sFilenameCGF geometry file name.

LoadGeomCache

Load geom cache into the entity slot.

Syntax
Entity.LoadGeomCache( int nSlot,const char *sFilename )
ParameterDescription
nSlotSlot identifier.
sFilenameCAX file name.

LoadLight

Load CGF geometry into the entity slot.

Syntax
Entity.LoadLight( nSlot, lightTable )
ParameterDescription
nSlotSlot identifier.
lightTableTable with all the light information.

SetLightColorParams

changes the color related params of an existing light.

Syntax
Entity.SetLightColorParams( nSlot, color, specular_multiplier)

UpdateLightClipBounds

Update the clip bounds of the light from the linked entities.

Syntax
Entity.UpdateLightClipBounds( nSlot )
ParameterDescription
nSlotSlot identifier.

SetSelfAsLightCasterException

Entity render node will be a caster exception for light loaded in nLightSlot.

Syntax
Entity.SetLightCasterException( nLightSlot, nGeometrySlot )
ParameterDescription
nLightSlotSlot where our light is loaded.

LoadCloud

Loads the cloud XML file into the entity slot.

Syntax
Entity.LoadCloud( nSlot, sFilename )
ParameterDescription
nSlotSlot identifier.
sFilenameFilename.

SetCloudMovementProperties

Sets the cloud movement properties.

Syntax
Entity.SetCloudMovementProperties( nSlot, table )
ParameterDescription
nSlotSlot identifier.
tableTable property for the cloud movement.

LoadFogVolume

Loads the fog volume XML file into the entity slot.

Syntax
Entity.LoadFogVolume( nSlot, table )
ParameterDescription
nSlotSlot identifier.
tableTable with fog volume properties.

FadeGlobalDensity

Sets the fade global density.

Syntax
Entity.FadeGlobalDensity( nSlot, fadeTime, newGlobalDensity )
ParameterDescription
nSlotnSlot identifier.
fadeTime.
newGlobalDensity.

LoadVolumeObject

Loads volume object.

Syntax
Entity.LoadVolumeObject( nSlot, sFilename )
ParameterDescription
nSlotSlot identifier.
sFilenameFile name of the volume object.

SetVolumeObjectMovementProperties

Sets the properties of the volume object movement.

Syntax
Entity.SetVolumeObjectMovementProperties( nSlot, table )
ParameterDescription
nSlotSlot identifier.
tableTable with volume object properties.

LoadParticleEffect

Loads CGF geometry into the entity slot.

Syntax
Entity.LoadParticleEffect( nSlot, sEffectName, fPulsePeriod, bPrime, fScale )
ParameterDescription
nSlotSlot identifier.
sEffectNameName of the particle effect (Ex: "explosions/rocket").
(optional) bPrimeWhether effect starts fully primed to equilibrium state.
(optional) fPulsePeriodTime period between particle effect restarts.
(optional) fScaleSize scale to apply to particles
(optional) fCountScaleCount multiplier to apply to particles
(optional) bScalePerUnitScale size by attachment extent
(optional) bCountPerUnitScale count by attachment extent
(optional) sAttachTypestring for EGeomType
(optional) sAttachFormstring for EGeomForm

PreLoadParticleEffect

Pre-loads a particle effect.

Syntax
Entity.PreLoadParticleEffect( sEffectName )
ParameterDescription
sEffectNameName of the particle effect (Ex: "explosions/rocket").

IsSlotParticleEmitter

Checks if the slot is a particle emitter.

Syntax
Entity.IsSlotParticleEmitter( slot )
ParameterDescription
slotSlot identifier.

IsSlotLight

Checks if the slot is a light.

Syntax
Entity.IsSlotLight( slot )
ParameterDescription
slotSlot identifier.

IsSlotGeometry

Checks if the slot is a geometry.

Syntax
Entity.IsSlotGeometry( slot )
ParameterDescription
slotSlot identifier.

IsSlotCharacter

Checks if the slot is a character.

Syntax
Entity.IsSlotCharacter( slot )
ParameterDescription
slotSlot identifier.

GetSlotCount

Gets the count of the slots.

Syntax
Entity.GetSlotCount()

GetSlotPos

Gets the slot position.

Syntax
Entity.GetSlotPos( nSlot )
ParameterDescription
nSlotnSlot identifier.

SetSlotPos

Sets the slot position.

Syntax
Entity.SetSlotPos( nSlot, v )
ParameterDescription
nSlotnSlot identifier.
vPosition to be set.

SetSlotPosAndDir

Sets the slot position and direction.

Syntax
Entity.SetSlotPosAndDir( nSlot, pos, dir )
ParameterDescription
nSlotnSlot identifier.
posPosition to be set.
dirDirection to be set.

GetSlotAngles

Gets the slot angles.

Syntax
Entity.GetSlotAngles( nSlot )
ParameterDescription
nSlotnSlot identifier.

SetSlotAngles

Sets the slot angles.

Syntax
Entity.GetSlotAngles( nSlot, v )
ParameterDescription
nSlotnSlot identifier.
vAngle to be set.

GetSlotScale

Gets the slot scale amount.

Syntax
Entity.GetSlotScale( nSlot )
ParameterDescription
nSlotnSlot identifier.

SetSlotScale

Sets the slot scale amount.

Syntax
Entity.SetSlotScale( nSlot, fScale )
ParameterDescription
nSlotSlot identifier.
fScaleScale amount for the slot.

IsSlotValid

Checks if the slot is valid.

Syntax
Entity.IsSlotValid( nSlot )
ParameterDescription
nSlotSlot identifier.

CopySlotTM

Copies the TM (Transformation Matrix) of the slot.

Syntax
Entity.CopySlotTM( destSlot, srcSlot, includeTranslation )
ParameterDescription
destSlotDestination slot identifier.
srcSlotSource slot identifier.
includeTranslationTrue to include the translation, false otherwise.

MultiplyWithSlotTM

Multiplies with the TM (Transformation Matrix) of the slot.

Syntax
Entity.MultiplyWithSlotTM( slot, pos )
ParameterDescription
slotSlot identifier.
posPosition vector.

SetSlotWorldTM

Sets the World TM (Transformation Matrix) of the slot.

Syntax
Entity.SetSlotWorldTM( nSlot, pos, dir )
ParameterDescription
nSlotSlot identifier.
posPosition vector.
dirDirection vector.

GetSlotWorldPos

Gets the World position of the slot.

Syntax
Entity.GetSlotWorldPos( nSlot )
ParameterDescription
nSlotSlot identifier.

GetSlotWorldDir

Gets the World direction of the slot.

Syntax
Entity.GetSlotWorldDir( nSlot )
ParameterDescription
nSlotSlot identifier.

SetSlotHud3D

Setup flags for use as 3D HUD entity.

Syntax
Entity.SetSlotHud3D( nSlot )
ParameterDescription
nSlotSlot identifier.

SetPos

Sets the position of the entity.

Syntax
Entity.SetPos( vPos )
ParameterDescription
vPosPosition vector.

GetPos

Gets the position of the entity.

Syntax
Entity.GetPos()

SetAngles

Sets the angle of the entity.

Syntax
Entity.SetAngles( vAngles )
ParameterDescription
vAnglesAngle vector.

GetAngles

Gets the angle of the entity.

Syntax
Entity.GetAngles()

SetScale

Sets the scaling value for the entity.

Syntax
Entity.SetScale( fScale )
ParameterDescription
fScaleScale amount.

GetScale

Gets the scaling value for the entity.

Syntax
Entity.GetScale()

GetCenterOfMassPos

Gets the position of the entity center of mass.

Syntax
Entity.GetCenterOfMassPos()

GetWorldBoundsCenter

Gets the world bbox center for the entity (defaults to entity position if no bbox present).

Syntax
Entity.GetWorldBoundsCenter()

SetLocalPos

Syntax
Entity.SetLocalPos( vPos )

GetLocalPos

Syntax
Vec3 Entity.GetLocalPos()

SetLocalAngles

Syntax
Entity.SetLocalAngles( vAngles )

GetLocalAngles

Syntax
Vec3 Entity.GetLocalAngles( vAngles )

SetLocalScale

Syntax
Entity.SetLocalScale( fScale )

GetLocalScale

Syntax
float Entity.GetLocalScale()

SetWorldPos

Syntax
Entity.SetWorldPos( vPos )

GetWorldPos

Syntax
Vec3 Entity.GetWorldPos()

GetWorldDir

Syntax
Vec3 Entity.GetWorldDir()

SetWorldAngles

Syntax
Entity.SetWorldAngles( vAngles )

GetWorldAngles

Syntax
Vec3 Entity.GetWorldAngles( vAngles )

SetWorldScale

Syntax
Entity.SetWorldScale( fScale )

GetWorldScale

Syntax
float Entity.GetWorldScale()

GetBoneLocal

Syntax
float Entity.GetBoneLocal( boneName, trgDir )

CalcWorldAnglesFromRelativeDir

Syntax
Ang3 Entity.CalcWorldAnglesFromRelativeDir( dir )

IsEntityInside

Syntax
float Entity.IsEntityInside(entityId)

GetDistance

Syntax
float Entity.GetDistance( entityId )
Returns: The distance from entity specified with entityId/

DrawSlot

Enables/Disables drawing of object or character at specified slot of the entity.

Syntax
Entity.DrawSlot( nSlot )
ParameterDescription
nSlotSlot identifier.
nEnable1-Enable drawing, 0-Disable drawing.

IgnorePhysicsUpdatesOnSlot

Ignore physics when it try to update the position of a slot.

Syntax
Entity.IgnorePhysicsUpdatesOnSlot( nSlot )
ParameterDescription
nSlotSlot identifier.

FreeSlot

Delete all objects from specified slot.

Syntax
Entity.FreeSlot( nSlot )
ParameterDescription
nSlotSlot identifier.

FreeAllSlots

Delete all objects on every slot part of the entity.

Syntax
Entity.FreeAllSlots()

GetCharacter

Gets the character for the specified slot if there is any.

Syntax
Entity.GetCharacter( nSlot )

DestroyPhysics

Syntax
Entity.DestroyPhysics()

EnablePhysics

Syntax
Entity.EnablePhysics( bEnable )

ResetPhysics

Syntax
Entity.ResetPhysics()

AwakePhysics

Syntax
Entity.AwakePhysics( nAwake )

AwakeCharacterPhysics

Syntax
Entity.AwakeCharacterPhysics( nSlot, sRootBoneName, nAwake )

Physicalize

<param name="physicsParams - Table with physicalization parameters.

Syntax
Entity.Physicalize( int nSlot,int nPhysicsType,table physicsParams )

SetPhysicParams

Syntax
Entity.SetPhysicParams()

SetCharacterPhysicParams

Syntax
Entity.SetCharacterPhysicParams()

ActivatePlayerPhysics

Syntax
Entity.ActivatePlayerPhysics( bEnable )

ReattachSoftEntityVtx

Syntax
Entity.ReattachSoftEntityVtx( partId )

PhysicalizeSlot

Syntax
Entity.PhysicalizeSlot( slot, physicsParams )

UpdateSlotPhysics

Syntax
Entity.UpdateSlotPhysics( slot )

SetColliderMode

Syntax
Entity.SetColliderMode( mode )

SelectPipe

Syntax
Entity.SelectPipe()

IsUsingPipe

Syntax
Entity.IsUsingPipe( pipename )
Returns: true - if entity is running the given goalpipe or has it inserted false - otherwise

Activate

Activates or deactivates entity. This calls ignores update policy and forces entity to activate or deactivate All active entities will be updated every frame, having too many active entities can affect performance. <param name="bActivate - if true entity will become active, is false will deactivate and stop being updated every frame.

Syntax
Entity.Activate( bActivate )

IsActive

Retrieve active status of entity.

Syntax
Entity.IsActive( bActivate )
Returns: true - Entity is active. false - Entity is not active.

IsFromPool

Returns if the entity came from an entity pool.

Syntax
Entity.IsFromPool()
Returns: true - Entity is from a pool. (Bookmarked) false - Entity is not from a pool. (Not bookmarked)

SetUpdatePolicy

Use SetUpdateRadius for update policy that require a radius.

Syntax
Entity.SetUpdatePolicy( nUpdatePolicy )
ParameterDescription
nUpdatePolicyUpdate policy type.

SetLocalBBox

Syntax
Entity.SetLocalBBox( vMin, vMax )

GetLocalBBox

Syntax
Entity.GetLocalBBox()

GetWorldBBox

Syntax
Entity.GetWorldBBox()

GetProjectedWorldBBox

Syntax
Entity.GetProjectedWorldBBox()

SetTriggerBBox

Syntax
Entity.SetTriggerBBox( vMin, vMax )

GetTriggerBBox

Syntax
Entity.GetTriggerBBox()

InvalidateTrigger

Syntax
Entity.InvalidateTrigger()

ForwardTriggerEventsTo

Syntax
Entity.ForwardTriggerEventsTo( entityId )

SetUpdateRadius

Syntax
Entity.SetUpdateRadius()

GetUpdateRadius

Syntax
Entity.GetUpdateRadius()

TriggerEvent

Syntax
Entity.TriggerEvent()

GetHelperPos

Syntax
Entity.GetHelperPos()

GetHelperDir

Syntax
Entity.GetHelperDir()

GetHelperAngles

Syntax
Entity.GetHelperAngles()

GetSlotHelperPos

Syntax
Entity.GetSlotHelperPos( slot, helperName, objectSpace )

GetBonePos

Syntax
Entity.GetBonePos()

GetBoneDir

Syntax
Entity.GetBoneDir()

GetBoneVelocity

Syntax
Entity.GetBoneVelocity( characterSlot, boneName )

GetBoneAngularVelocity

Syntax
Entity.GetBoneAngularVelocity( characterSlot, oneName )

GetBoneNameFromTable

Syntax
Entity.GetBoneNameFromTable()

SetName

Syntax
Entity.SetName()

GetName

Syntax
Entity.GetName()

GetRawId

Returns entityId in raw numeric format.

Syntax
Entity.GetRawId()

SetAIName

Syntax
Entity.SetAIName()

GetAIName

Syntax
Entity.GetAIName()

SetFlags

Mode: 0: or 1: and 2: xor

Syntax
Entity.SetFlags( flags, mode )

GetFlags

Syntax
Entity.GetFlags()

HasFlags

Syntax
Entity.HasFlags( flags )

SetFlagsExtended

Mode: 0: or 1: and 2: xor

Syntax
Entity.SetFlagsExtended( flags, mode )

GetFlagsExtended

Syntax
Entity.GetFlagsExtended()

HasFlagsExtended

Syntax
Entity.HasFlags( flags )

GetArchetype

Retrieve the archetype of the entity.

Syntax
Entity.GetArchetype()
Returns: name of entity archetype, nil if no archetype.

IntersectRay

Syntax
Entity.IntersectRay( slot, rayOrigin, rayDir, maxDistance )

AttachChild

Syntax
Entity.AttachChild( childEntityId, flags )

DetachThis

Syntax
Entity.DetachThis()

DetachAll

Syntax
Entity.DetachAll()

GetParent

Syntax
Entity.GetParent()

GetChildCount

Syntax
Entity.GetChildCount()

GetChild

Syntax
Entity.GetChild( int nIndex )

EnableInheritXForm

Enables/Disable entity from inheriting transformation from the parent.

Syntax
Entity.EnableInheritXForm()

NetPresent

Syntax
Entity.NetPresent()

RenderShadow

Syntax
Entity.RenderShadow()

SetRegisterInSectors

Syntax
Entity.SetRegisterInSectors()

IsColliding

Syntax
Entity.IsColliding()

GetDirectionVector

Syntax
Entity.GetDirectionVector()

SetDirectionVector

Syntax
Entity.SetDirectionVector( direction )

IsAnimationRunning

Syntax
Entity.IsAnimationRunning( characterSlot, layer )
Returns: nil or not nil
ParameterDescription
characterSlotIndex of the character slot.
layerIndex of the animation layer.

AddImpulse

Apply an impulse to the entity. At least four parameters need to be provided for a linear impulse. For an additional angular impulse, at least seven parameters need to be provided.

Syntax
Entity.AddImpulse( ipart, position, direction, linearImpulse, linearImpulseScale, angularAxis, angularImpulse, massScale )
ParameterDescription
ipartThe index of the part that receives the impulse.
positionThe point (in world coordinates) where the impulse is applied. Set this to (0, 0, 0) to ignore it.
directionThe direction in which the impulse is applied.
linearImpulseThe force of the linear impulse.
linearImpulseScaleScaling of the linear impulse. (Default: 1.0)
angularAxisThe axis on which the angular impulse is applied.
angularImpulseThe force of the the angular impulse.
massScaleMass scaling of the angular impulse. (Default: 1.0)

AddConstraint

Syntax
Entity.AddConstraint()

SetPublicParam

Set a shader parameter

Syntax
Entity.SetPublicParam()
ParameterDescription
paramNameThe name of the shader parameter.
valueThe new value of the parameter.

GetAllAuxAudioProxiesID

Returns the ID used to address all AuxAudioProxy of the parent EntityAudioProxy.

Syntax
Entity.GetAllAuxAudioProxiesID()
Returns: Returns the ID used to address all AuxAudioProxy of the parent EntityAudioProxy.

GetDefaultAuxAudioProxyID

Returns the ID of the default AudioProxy of the parent EntityAudioProxy.

Syntax
Entity.GetDefaultAuxAudioProxyID()
Returns: Returns the ID of the default AudioProxy of the parent EntityAudioProxy.

CreateAuxAudioProxy

Creates an additional AudioProxy managed by the EntityAudioProxy. The created AuxAudioProxy will move and rotate with the parent EntityAudioProxy.

Syntax
Entity.CreateAuxAudioProxy()
Returns: Returns the ID of the additionally created AudioProxy.

RemoveAuxAudioProxy

Removes the AuxAudioProxy corresponding to the passed ID from the parent EntityAudioProxy.

Syntax
Entity.RemoveAuxAudioProxy( hAudioProxyLocalID )
Returns: nil
ParameterDescription
hAudioProxyLocalIDhAudioProxyLocalID - ID of the AuxAudioProxy to be removed from the parent EntityAudioProxy.

ExecuteAudioTrigger

Execute the specified audio trigger and attach it to the entity. The created audio object will move and rotate with the entity.

Syntax
Entity.ExecuteAudioTrigger( hTriggerID, hAudioProxyLocalID )
Returns: nil
ParameterDescription
hTriggerIDthe audio trigger ID handle
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

StopAudioTrigger

Stop the audio event generated by the trigger with the specified ID on this entity.

Syntax
Entity.StopAudioTrigger( hTriggerID, hAudioProxyLocalID )
Returns: nil
ParameterDescription
hTriggerIDthe audio trigger ID handle
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

SetAudioSwitchState

Set the specified audio switch to the specified state on the current Entity.

Syntax
Entity.SetAudioSwitchState( hSwitchID, hSwitchStateID, hAudioProxyLocalID )
Returns: nil
ParameterDescription
hSwitchIDthe audio switch ID handle
nSwitchStateIDthe switch state ID handle
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

SetAudioObstructionCalcType

Set the Audio Obstruction/Occlusion calculation type on the underlying GameAudioObject.

Syntax
Entity.SetAudioObstructionCalcType( nObstructionCalcType, hAudioProxyLocalID )
Returns: nil
ParameterDescription
nObstructionCalcTypeObstruction/Occlusion calculation type; Possible values: 0 - ignore Obstruction/Occlusion 1 - use single physics ray 2 - use multiple physics rays (currently 5 per object)
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

SetFadeDistance

Sets the distance in which this entity will execute fade calculations.

Syntax
Entity.SetFadeDistance( fFadeDistance )
Returns: nil
ParameterDescription
fFadeDistancefade distance in meters

SetAudioProxyOffset

Set offset on the AudioProxy attached to the Entity.

Syntax
Entity.SetAudioProxyOffset( vOffset, hAudioProxyLocalID )
Returns: nil
ParameterDescription
vOffsetoffset vector
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

SetEnvironmentFadeDistance

Sets the distance over which this entity will fade the audio environment amount for all approaching entities.

Syntax
Entity.SetEnvironmentFadeDistance( fEnvironmentFadeDistance )
Returns: nil
ParameterDescription
fEnvironmentFadeDistancefade distance in meters

SetAudioEnvironmentID

Sets the ID of the audio environment this entity will set for entities inside it.

Syntax
Entity.SetAudioEnvironmentID( nAudioEnvironmentID )
Returns: nil
ParameterDescription
nAudioEnvironmentIDaudio environment ID

SetCurrentAudioEnvironments

Sets the correct audio environment amounts based on the entity's position in the world.

Syntax
Entity.SetCurrentAudioEnvironments()
Returns: nil

SetAudioRtpcValue

Set the specified audio RTPC to the specified value on the current Entity.

Syntax
Entity.SetAudioRtpcValue( hRtpcID, fValue, hAudioProxyLocalID )
Returns: nil
ParameterDescription
hRtpcIDthe audio RTPC ID handle
fValuethe RTPC value
hAudioProxyLocalIDID of the AuxAudioProxy local to the EntityAudioProxy (to address the default AuxAudioProxy pass 1 to address all AuxAudioProxies pass 0)

AuxAudioProxiesMoveWithEntity

Set whether AuxAudioProxies should move with the entity or not.

Syntax
Entity.AuxAudioProxiesMoveWithEntity( bCanMoveWithEntity )
Returns: nil
ParameterDescription
bCanMoveWithEntityboolean parameter to enable or disable

SetGeomCachePlaybackTime

Sets the playback time.

Syntax
 Entity.SetGeomCachePlaybackTime()

SetGeomCacheParams

Sets geometry cache parameters.

Syntax
 Entity.SetGeomCacheParams()

SetGeomCacheStreaming

Activates/deactivates geom cache streaming.

Syntax
 Entity.SetGeomCacheStreaming()

IsGeomCacheStreaming

Syntax
 Entity.IsGeomCacheStreaming()
Returns: true if geom cache is streaming.

GetGeomCachePrecachedTime

Gets time delta from current playback position to last ready to play frame.

Syntax
 Entity.GetGeomCachePrecachedTime()

SetGeomCacheDrawing

Activates/deactivates geom cache drawing.

Syntax
 Entity.SetGeomCacheDrawing()

StartAnimation

Syntax
Entity.StartAnimation()

StopAnimation

Syntax
Entity.StopAnimation( characterSlot, layer )

ResetAnimation

Syntax
Entity.ResetAnimation( characterSlot, layer )

RedirectAnimationToLayer0

Syntax
Entity.RedirectAnimationToLayer0( characterSlot, redirect )

SetAnimationBlendOut

Syntax
Entity.SetAnimationBlendOut( characterSlot, layer, blendOut )

EnableBoneAnimation

Syntax
Entity.EnableBoneAnimation( characterSlot, layer, boneName, status )

EnableBoneAnimationAll

Syntax
Entity.EnableBoneAnimationAll( characterSlot, layer, status )

EnableProceduralFacialAnimation

Syntax
Entity.EnableProceduralFacialAnimation( enable )

PlayFacialAnimation

Syntax
Entity.PlayFacialAnimation( name, looping )

SetAnimationEvent

Syntax
Entity.SetAnimationEvent( nSlot, sAnimation )

SetAnimationKeyEvent

Syntax
Entity.SetAnimationKeyEvent( nSlot, sAnimation, nFrameID, sEvent)

DisableAnimationEvent

Syntax
Entity.DisableAnimationEvent( nSlot, sAnimation )

SetAnimationSpeed

Syntax
 Entity.SetAnimationSpeed( characterSlot, layer, speed )

SetAnimationTime

Syntax
 Entity.SetAnimationTime( nSlot, nLayer, fTime )

GetAnimationTime

Syntax
 Entity.GetAnimationTime( nSlot, nLayer )

GetCurAnimation

Syntax
 Entity.GetCurAnimation()

GetAnimationLength

Syntax
 Entity.GetAnimationLength( characterSlot, animation )

SetAnimationFlip

Syntax
 Entity.SetAnimationFlip( characterSlot, flip )

SetTimer

Syntax
 Entity.SetTimer()

KillTimer

Syntax
 Entity.KillTimer()

SetScriptUpdateRate

Syntax
 Entity.SetScriptUpdateRate( nMillis )

GotoState

Syntax
 Entity.GotoState( sState )

IsInState

Syntax
 Entity.IsInState( sState )

GetState

Syntax
 Entity.GetState()

IsHidden

Syntax
 Entity.IsHidden()

GetTouchedSurfaceID

Syntax
 Entity.GetTouchedSurfaceID()

GetTouchedPoint

Retrieves point of collision for rigid body.

Syntax
 Entity.GetTouchedPoint()

CreateBoneAttachment

Syntax
 Entity.CreateBoneAttachment( characterSlot, boneName, attachmentName )

CreateSkinAttachment

Syntax
 Entity.CreateSkinAttachment( characterSlot, attachmentName )

DestroyAttachment

Syntax
 Entity.DestroyAttachment( characterSlot, attachmentName )

GetAttachmentBone

Syntax
 Entity.GetAttachmentBone( characterSlot, attachmentName )

GetAttachmentCGF

Syntax
 Entity.GetAttachmentCGF( characterSlot, attachmentName )

ResetAttachment

Syntax
 Entity.ResetAttachment( characterSlot, attachmentName )

SetAttachmentEffect

Syntax
 Entity.SetAttachmentEffect( characterSlot, attachmentName, effectName, offset, dir, scale, flags )

SetAttachmentObject

Syntax
 Entity.SetAttachmentObject( characterSlot, attachmentName, entityId, slot, flags )

SetAttachmentCGF

Syntax
 Entity.SetAttachmentCGF( characterSlot, attachmentName, filePath )

SetAttachmentLight

Syntax
 Entity.SetAttachmentLight( characterSlot, attachmentName, lightTable, flags )

SetAttachmentPos

Syntax
 Entity.SetAttachmentPos( characterSlot, attachmentName, pos )

SetAttachmentAngles

Syntax
 Entity.SetAttachmentAngles( characterSlot, attachmentName, angles )

SetAttachmentDir

Syntax
 Entity.SetAttachmentDir()

HideAttachment

Syntax
 Entity.HideAttachment( characterSlot, attachmentName, hide, hideShadow )

HideAllAttachments

Syntax
 Entity.HideAllAttachments( characterSlot, hide, hideShadow )

HideAttachmentMaster

Syntax
 Entity.HideAttachmentMaster( characterSlot, hide )

PhysicalizeAttachment

Syntax
 Entity.PhysicalizeAttachment( characterSlot, attachmentName, physicalize )

Damage

Syntax
 Entity.Damage()

GetEntitiesInContact

Syntax
 Entity.GetEntitiesInContact()

GetExplosionObstruction

Syntax
 Entity.GetExplosionObstruction()

GetExplosionImpulse

Syntax
 Entity.GetExplosionImpulse()

SetMaterial

Syntax
 Entity.SetMaterial()

GetMaterial

Syntax
 Entity.GetMaterial()

GetEntityMaterial

Syntax
 Entity.GetEntityMaterial()

ChangeAttachmentMaterial

Syntax
 Entity.ChangeAttachmentMaterial(attachmentName, materialName)

ReplaceMaterial

Syntax
 Entity.ReplaceMaterial( slot, name, replacement )

ResetMaterial

Syntax
 Entity.ResetMaterial( slot )

EnableMaterialLayer

Syntax
 Entity.EnableMaterialLayer( enable, layer )

CloneMaterial

Replace material on the slot with a cloned version of the material. Cloned material can be freely changed uniquely for this entity.

Syntax
Entity.CloneMaterial( nSlotId, sSubMaterialName )
ParameterDescription
nSlotIdOn which slot to clone material.
sSubMaterialNameif non empty string only this specific sub-material is cloned.

SetMaterialFloat

Change material parameter.

Syntax
Entity.SetMaterialFloat( nSlotId, nSubMtlId, sParamName, fValue )
ParameterDescription
nSlotOn which slot to change material.
nSubMtlIdSpecify sub-material by Id.
sParamNameName of the material parameter.
fValueNew material parameter value.

GetMaterialFloat

Change material parameter.

Syntax
Entity.GetMaterialFloat( nSlotId, nSubMtlId, sParamName )
Returns: Material parameter value.
ParameterDescription
nSlotOn which slot to change material.
nSubMtlIdSpecify sub-material by Id.
sParamNameName of the material parameter.

SetMaterialVec3

Syntax
Entity.SetMaterialVec3( nSlotId, nSubMtlId, sParamName, vVec3 )

GetMaterialVec3

Syntax
Entity.GetMaterialVec3( nSlotId, nSubMtlId, sParamName )

MaterialFlashInvoke

Syntax
Entity.MaterialFlashInvoke()

ToLocal

Syntax
Entity.ToLocal( slotId, point )

ToGlobal

Syntax
Entity.ToGlobal( slotId, point )

VectorToLocal

Syntax
Entity.VectorToLocal( slotId, dir )

VectorToGlobal

Syntax
Entity.VectorToGlobal( slotId, dir )

CheckCollisions

Syntax
Entity.CheckCollisions()

AwakeEnvironment

Syntax
Entity.AwakeEnvironment()

GetTimeSinceLastSeen

Syntax
Entity.GetTimeSinceLastSeen()

GetViewDistRatio

Syntax
Entity.GetViewDistRatio()

SetViewDistRatio

Syntax
Entity.SetViewDistRatio()

SetViewDistUnlimited

Syntax
Entity.SetViewDistUnlimited()

SetLodRatio

Syntax
Entity.SetLodRatio()

GetLodRatio

Syntax
Entity.GetLodRatio()

SetStateClientside

Syntax
Entity.SetStateClientside()

InsertSubpipe

Syntax
Entity.InsertSubpipe()

CancelSubpipe

Syntax
Entity.CancelSubpipe()

PassParamsToPipe

Syntax
Entity.PassParamsToPipe()

SetDefaultIdleAnimations

Syntax
Entity.SetDefaultIdleAnimations()

GetVelocity

Syntax
Entity.GetVelocity()

GetVelocityEx

Syntax
Entity.GetVelocityEx()

SetVelocity

Syntax
Entity.SetVelocity(velocity)

SetVelocityEx

Syntax
Entity.GetVelocityEx(velocity, angularVelocity)

GetSpeed

Syntax
Entity.GetSpeed()

GetMass

Syntax
Entity.GetMass()

GetVolume

Syntax
Entity.GetVolume(slot)

GetGravity

Syntax
Entity.GetGravity()

GetSubmergedVolume

Syntax
Entity.GetSubmergedVolume( slot, planeNormal, planeOrigin )

Creates a new outgoing link for this entity.

Syntax
Entity.CreateLink( name, targetId )
Returns: nothing
ParameterDescription
nameName of the link. Does not have to be unique among all the links of this entity. Multiple links with the same name can perfectly co-exist.
(optional) targetIdIf specified, the ID of the entity the link shall target. If not specified or 0 then the link will not target anything. Default value: 0

GetLinkName

Returns the name of the link that is targeting the entity with given ID.

Syntax
Entity.GetLinkName( targetId, ith )
Returns: The name of the i'th link targeting given entity or nil if no such link exists.
ParameterDescription
targetIdID of the entity for which the link name shall be looked up.
(optional) ithIf specified, the i'th link that targets given entity. Default value: 0 (first entity)

SetLinkTarget

Specifies the entity that an existing link shall target. Use this function to change the target of an existing link.

Syntax
Entity.SetLinkTarget(name, targetId, ith)
Returns: nothing
ParameterDescription
nameName of the link that shall target given entity.
targetIdThe ID of the entity the link shall target. Pass in NULL_ENTITY to make the link no longer target an entity.
(optional) ithIf specified, the i'th link with given name that shall target given entity. Default value: 0 (first link with given name)

GetLinkTarget

Returns the ID of the entity that given link is targeting.

Syntax
Entity.GetLinkTarget( name, ith )
Returns: The ID of the entity that the link is targeting or nil if no such link exists.
ParameterDescription
nameName of the link.
(optional) ithIf specified, the i'th link with given name for which to look up the targeted entity. Default value: 0 (first link with given name)

Removes an outgoing link from the entity.

Syntax
Entity.RemoveLink( name, ith )
Returns: nothing
ParameterDescription
nameName of the link to remove.
(optional) ithIf specified, the i'th link with given name that shall be removed. Default value: 0 (first link with given name)

Removes all links of an entity.

Syntax
Entity.RemoveAllLinks()
Returns: nothing

Returns the link at given index.

Syntax
Entity.GetLink()
Returns: The script table of the entity that the i'th link is targeting or nil if the specified index is out of bounds.
ParameterDescription
ithThe index of the link that shall be returned.

Counts all outgoing links of the entity.

Syntax
Entity.CountLinks()
Returns: Number of outgoing links.

RemoveDecals

Syntax
Entity.RemoveDecals()

ForceCharacterUpdate

Syntax
Entity.ForceCharacterUpdate( characterSlot, updateAlways )

CharacterUpdateAlways

Syntax
Entity.CharacterUpdateAlways( characterSlot, updateAlways )

CharacterUpdateOnRender

Syntax
Entity.CharacterUpdateOnRender( characterSlot, bUpdateOnRender )

SetAnimateOffScreenShadow

Syntax
Entity.SetAnimateOffScreenShadow( bAnimateOffScreenShadow )

RagDollize

Syntax
Entity.RagDollize(slot)

Hide

Syntax
Entity.Hide()

NoExplosionCollision

Syntax
Entity.NoExplosionCollision()

NoBulletForce

Syntax
Entity.NoBulletForce( state )

UpdateAreas

Syntax
Entity.UpdateAreas()

IsPointInsideArea

Syntax
Entity.IsPointInsideArea( areaId, point )

IsEntityInsideArea

Syntax
Entity.IsEntityInsideArea( areaId, entityId )

GetPhysicalStats

Some more physics related.

Syntax
Entity.GetPhysicalStats()

SetParentSlot

Syntax
Entity.SetParentSlot( child, parent )

GetParentSlot

Syntax
Entity.GetParentSlot( child )

BreakToPieces

Breaks static geometry in slot 0 into sub objects and spawn them as particles or entities.

Syntax
Entity.BreakToPieces()

AttachSurfaceEffect

Syntax
Entity.AttachSurfaceEffect( nSlot, effect, countPerUnit, form, typ, countScale, sizeScale )

ProcessBroadcastEvent

Syntax
Entity.ProcessBroadcastEvent()

ActivateOutput

Syntax
Entity.ActivateOutput()

CreateCameraProxy

Create a proxy camera object for the entity, allows entity to serve as camera source for material assigned on the entity.

Syntax
Entity.CreateCameraProxy()

UnSeenFrames

Syntax
Entity.UnSeenFrames()

DeleteParticleEmitter

Deletes particles emitter from 3dengine.

Syntax
Entity.DeleteParticleEmitter(slot)
ParameterDescription
slotslot number

RegisterForAreaEvents

Registers the script proxy so that it receives area events for this entity.

Syntax
Entity.RegisterForAreaEvents(enable)
ParameterDescription
enable0, for disable, any other value for enable.

RenderAlways

Enables 'always render' on the render node, skipping any kind of culling.

Syntax
Entity.RenderAlways(enable)
ParameterDescription
enable0, for disable, any other value for enable.

GetTimeOfDayHour

Syntax
Entity.GetTimeOfDayHour()
Returns: current time of day as a float value.

CreateDRSProxy

Creates a Dynamic Response System Proxy

Syntax
Entity.CreateDRSProxy()
Returns: Returns the ID of the created proxy.
  • No labels