HPL3/Amnesia: Rebirth/Scripting/Scripting Api/Prop
This page has been automatically generated, but it needs descriptions added to the various fields/functions in order to be complete. |
Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!
Contents
- 1 Summary
- 2 Function Detail
- 2.1 Prop_AddAttachedProp
- 2.2 Prop_AddHealth
- 2.3 Prop_AlignRotation
- 2.4 Prop_ClearVelocity
- 2.5 Prop_Clone
- 2.6 Prop_CopyScriptProperties
- 2.7 Prop_CopyState
- 2.8 Prop_DisableCollisionUntilOutsidePlayer
- 2.9 Prop_GetHealth
- 2.10 Prop_MoveLinearTo
- 2.11 Prop_RemoveAttachedProp
- 2.12 Prop_RotateToSpeed
- 2.13 Prop_RotateToSpeed
- 2.14 Prop_SetActiveAndFade
- 2.15 Prop_SetAllowMapTransfer
- 2.16 Prop_SetHealth
- 2.17 Prop_SetStaticPhysics
- 2.18 Prop_StopMovement
Summary
Return Type | Function and Description |
---|---|
void | Prop_AddAttachedProp(tString &in asPropName, tString &in asAttachName, tString &in asAttachFile, cVector3f &in avPosOffset, cVector3f &in avRotOffset) Attaches a prop mesh (any other data is skipped) to a Prop |
void | Prop_AddHealth(const tString &in asPropName, float afHealth) Adds health to a prop |
void | Prop_AlignRotation(const tString &in asName, const tString &in asTargetEntity, float afAcceleration, float afMaxSpeed, float afSlowDownDist, bool abResetSpeed, const tString &in asCallback = "", const tString &in asOffsetEntity = "") Aligns the rotation of the specified prop to the current rotation of the target entity |
void | Prop_ClearVelocity(const tString &in asPropName) Clear out all velocity on a prop |
bool | Prop_Clone(const tString &in asSourceProp, const tString &in asDestName, float afScale = 1.0f) Returns a new copy of asSourceProp as a new prop called asDestName, with asSourceProp's properties |
bool | Prop_CopyScriptProperties(const tString &in asSourceProp, const tString &in asDestProp) Copies all script properties (but not position, bodies and so on) from one prop to another existing prop of the same type |
bool | Prop_CopyState(const tString &in asSourceProp, const tString &in asDestProp) Copies all properties etc |
void | Prop_DisableCollisionUntilOutsidePlayer(const tString &in asPropName) |
float | Prop_GetHealth(const tString &in asPropName) Gets the health of a prop |
void | Prop_MoveLinearTo(const tString &in asName, const tString &in asTargetEntity, float afAcceleration, float afMaxSpeed, float afSlowDownDist, bool abResetSpeed, const tString &in asCallback = "") Moves the specified prop to the current position of the target entity |
void | Prop_RemoveAttachedProp(tString &in asPropName, tString &in asAttachName) Removes an attached prop from a prop |
void | Prop_RotateToSpeed(const tString &in asPropName, float afAcc, float afGoalSpeed, const cVector3f &in avAxis, bool abResetSpeed, const tString &in asOffsetEntity) Rotates a prop to a target speed |
void | Prop_RotateToSpeed(const tString &in asPropName, float afAcc, float afGoalSpeed, bool abResetSpeed, const tString &in asOffsetEntity) Rotates a prop to a target speed |
void | Prop_SetActiveAndFade(const tString &in asPropName, bool abActive, float afFadeTime) Activates or deactivates a entity and fades the mesh in or out |
void | Prop_SetAllowMapTransfer(const tString &in asPropName, bool abX) Sets if a prop should be transfered |
void | Prop_SetHealth(const tString &in asPropName, float afHealth) Sets the health of a prop |
void | Prop_SetStaticPhysics(const tString &in asPropName, bool abX) Sets the physics of the object to static or dynamic |
void | Prop_StopMovement(const tString &in asPropName) Stops the static movement of a prop |
Function Detail
Prop_AddAttachedProp
void Prop_AddAttachedProp(tString &in asPropName,
tString &in asAttachName,
tString &in asAttachFile,
cVector3f &in avPosOffset,
cVector3f &in avRotOffset)
Attaches a prop mesh (any other data is skipped) to a Prop
Parameters
- asPropName (tString) —
- asAttachName (tString) —
- asAttachFile (tString) —
- avPosOffset (cVector3f) —
- avRotOffset (cVector3f) —
Returns:
- void
Prop_AddHealth
void Prop_AddHealth(const tString &in asPropName,
float afHealth)
Adds health to a prop.
Parameters
- asPropName (tString) —
- afHealth (float) —
Returns:
- void
Prop_AlignRotation
void Prop_AlignRotation(const tString &in asName,
const tString &in asTargetEntity,
float afAcceleration,
float afMaxSpeed,
float afSlowDownDist,
bool abResetSpeed,
const tString &in asCallback = "",
const tString &in asOffsetEntity = "")
Aligns the rotation of the specified prop to the current rotation of the target entity.
Parameters
- asName (tString) —
- asTargetEntity (tString) —
- afAcceleration (float) —
- afMaxSpeed (float) —
- afSlowDownDist (float) —
- abResetSpeed (bool) —
- asCallback (tString) —
- asOffsetEntity (tString) —
Returns:
- void
Prop_ClearVelocity
void Prop_ClearVelocity(const tString &in asPropName)
Clear out all velocity on a prop.
Parameters
- asPropName (tString) —
Returns:
- void
Prop_Clone
Prop_CopyScriptProperties
Prop_CopyState
Prop_DisableCollisionUntilOutsidePlayer
void Prop_DisableCollisionUntilOutsidePlayer(const tString &in asPropName)
Parameters
- asPropName (tString) —
Returns:
- void
Prop_GetHealth
float Prop_GetHealth(const tString &in asPropName)
Gets the health of a prop.
Parameters
- asPropName (tString) —
Returns:
- float—float, the health of the specified prop.
Prop_MoveLinearTo
void Prop_MoveLinearTo(const tString &in asName,
const tString &in asTargetEntity,
float afAcceleration,
float afMaxSpeed,
float afSlowDownDist,
bool abResetSpeed,
const tString &in asCallback = "")
Moves the specified prop to the current position of the target entity.
Parameters
- asName (tString) —
- asTargetEntity (tString) —
- afAcceleration (float) —
- afMaxSpeed (float) —
- afSlowDownDist (float) —
- abResetSpeed (bool) —
- asCallback (tString) —
Returns:
- void
Prop_RemoveAttachedProp
Prop_RotateToSpeed
void Prop_RotateToSpeed(const tString &in asPropName,
float afAcc,
float afGoalSpeed,
const cVector3f &in avAxis,
bool abResetSpeed,
const tString &in asOffsetEntity)
Rotates a prop to a target speed.
the prop will rotate around its own axis.
Parameters
- asPropName (tString) —
- afAcc (float) —
- afGoalSpeed (float) —
- avAxis (cVector3f) —
- abResetSpeed (bool) —
- asOffsetEntity (tString) —
Returns:
- void
Prop_RotateToSpeed
void Prop_RotateToSpeed(const tString &in asPropName,
float afAcc,
float afGoalSpeed,
bool abResetSpeed,
const tString &in asOffsetEntity)
Rotates a prop to a target speed. Using the up vector of offset entity as axis.
If left as , the prop will rotate around its own up axis.
Parameters
- asPropName (tString) —
- afAcc (float) —
- afGoalSpeed (float) —
- abResetSpeed (bool) —
- asOffsetEntity (tString) —
Returns:
- void
Prop_SetActiveAndFade
void Prop_SetActiveAndFade(const tString &in asPropName,
bool abActive,
float afFadeTime)
Activates or deactivates a entity and fades the mesh in or out.
Parameters
- asPropName (tString) —
- abActive (bool) —
- afFadeTime (float) —
Returns:
- void
Prop_SetAllowMapTransfer
void Prop_SetAllowMapTransfer(const tString &in asPropName,
bool abX)
Sets if a prop should be transfered
Parameters
- asPropName (tString) —
- abX (bool) —
Returns:
- void
Prop_SetHealth
void Prop_SetHealth(const tString &in asPropName,
float afHealth)
Sets the health of a prop
Parameters
- asPropName (tString) —
- afHealth (float) —
Returns:
- void
Prop_SetStaticPhysics
void Prop_SetStaticPhysics(const tString &in asPropName,
bool abX)
Sets the physics of the object to static or dynamic
Parameters
- asPropName (tString) —
- abX (bool) —
Returns:
- void
Prop_StopMovement
void Prop_StopMovement(const tString &in asPropName)
Stops the static movement of a prop.
Parameters
- asPropName (tString) —
Returns:
- void