Difference between revisions of "HPL3/SOMA/Scripting/Scripting Api/Entity"

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
Jump to navigation Jump to search
Line 47: Line 47:
 
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
 
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
 
{{CodeDocDetailBody|Get if an entity automatically falls asleep when it isnt active}}
 
{{CodeDocDetailBody|Get if an entity automatically falls asleep when it isnt active}}
 +
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 
{{CodeDocDetailReturn|bool|if sleeping or not.}}
 
{{CodeDocDetailReturn|bool|if sleeping or not.}}
Line 55: Line 56:
 
                           bool abOccluder)</syntaxhighlight>
 
                           bool abOccluder)</syntaxhighlight>
 
{{CodeDocDetailBody|Set if entity is an occluder}}
 
{{CodeDocDetailBody|Set if entity is an occluder}}
 +
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity, Wildcard(s) * are supported *}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity, Wildcard(s) * are supported *}}
 
{{CodeDocDetailParam|abOccluder|bool|<nowiki>true = object is occluder</nowiki>}}
 
{{CodeDocDetailParam|abOccluder|bool|<nowiki>true = object is occluder</nowiki>}}
Line 63: Line 65:
 
<syntaxhighlight lang="c++">bool Entity_IsOccluder(const tString &in asName)</syntaxhighlight>
 
<syntaxhighlight lang="c++">bool Entity_IsOccluder(const tString &in asName)</syntaxhighlight>
 
{{CodeDocDetailBody|Get if an entity is an occluder}}
 
{{CodeDocDetailBody|Get if an entity is an occluder}}
 +
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 
{{CodeDocDetailReturn|bool|if entity is an occluder}}
 
{{CodeDocDetailReturn|bool|if entity is an occluder}}
Line 70: Line 73:
 
<syntaxhighlight lang="c++">bool Entity_IsInteractedWith(const tString &in asName)</syntaxhighlight>
 
<syntaxhighlight lang="c++">bool Entity_IsInteractedWith(const tString &in asName)</syntaxhighlight>
 
{{CodeDocDetailBody|Checks if the entity is being interacted with.}}
 
{{CodeDocDetailBody|Checks if the entity is being interacted with.}}
 +
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of the entity.}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of the entity.}}
 
{{CodeDocDetailReturn|bool|if the entity is being interacted with}}
 
{{CodeDocDetailReturn|bool|if the entity is being interacted with}}
Line 79: Line 83:
 
                         const tString &in asX)</syntaxhighlight>
 
                         const tString &in asX)</syntaxhighlight>
 
{{CodeDocDetailBody|Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName. *}}
 
{{CodeDocDetailBody|Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName. *}}
 +
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asEntityName|[[../../tString|tString]]|}}
 
{{CodeDocDetailParam|asEntityName|[[../../tString|tString]]|}}
 
{{CodeDocDetailParam|asVarName|[[../../tString|tString]]|}}
 
{{CodeDocDetailParam|asVarName|[[../../tString|tString]]|}}

Revision as of 23:39, 11 August 2020

Summary

Raw HTML

Return Type Function and Description
bool Entity_GetAutoSleep(const tString &in asName)
Get if an entity automatically falls asleep when it isnt active
void Entity_SetIsOccluder(const tString &in asName, bool abOccluder)
Set if entity is an occluder
bool Entity_IsOccluder(const tString &in asName)
Get if an entity is an occluder
bool Entity_IsInteractedWith(const tString &in asName)
Checks if the entity is being interacted with.
void Entity_SetVarString(const tString &in asName, const tString &in asVarName, const tString &in asX)
Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName.

Template

Return Type Function and Description
bool Entity_GetAutoSleep(const tString &in asName)
Get if an entity automatically falls asleep when it isnt active
void Entity_SetIsOccluder(const tString &in asName, bool abOccluder)
Set if entity is an occluder
bool Entity_IsOccluder(const tString &in asName)
Get if an entity is an occluder
bool Entity_IsInteractedWith(const tString &in asName)
Checks if the entity is being interacted with.
void Entity_SetVarString(const tString &in asName, const tString &in asVarName, const tString &in asX)
Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName.

Function Detail

Entity_GetAutoSleep

bool Entity_GetAutoSleep(const tString &in asName)

Get if an entity automatically falls asleep when it isnt active

Parameters

  • asName (tString) — Name of the entity.

Returns:

  • bool—if sleeping or not.

Entity_SetIsOccluder

void Entity_SetIsOccluder(const tString &in asName,
                          bool abOccluder)

Set if entity is an occluder

Parameters

  • asName (tString) — Name of the entity, Wildcard(s) * are supported *
  • abOccluder (bool) — true = object is occluder

Returns:

  • void

Entity_IsOccluder

bool Entity_IsOccluder(const tString &in asName)

Get if an entity is an occluder

Parameters

  • asName (tString) — Name of the entity.

Returns:

  • bool—if entity is an occluder

Entity_IsInteractedWith

bool Entity_IsInteractedWith(const tString &in asName)

Checks if the entity is being interacted with.

Parameters

  • asName (tString) — name of the entity.

Returns:

  • bool—if the entity is being interacted with

Entity_SetVarString

void Entity_SetVarString(const tString &in asEntityName,
                         const tString &in asVarName,
                         const tString &in asX)

Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName. *

Parameters

Returns:

  • void