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 44: Line 44:
 
==Function Detail==
 
==Function Detail==
  
<div style="background: #202020; border: 1px solid black; margin-bottom: 20px;">
+
{{CodeDocDetailTop|Entity_GetAutoSleep}}
<h2 style="border-bottom: 1px solid black; background: #232339; margin: 0; padding: 6px 20px; font-family: monospace">Entity_GetAutoSleep</h2>
 
 
 
<div style="padding: 0 8px 8px 8px">
 
 
<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}}
 +
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 +
{{CodeDocDetailReturn|bool|if sleeping or not.}}
 +
{{CodeDocDetailBottom}}
  
Get if an entity automatically falls asleep when it isnt active
+
{{CodeDocDetailTop|Entity_SetIsOccluder}}
 
 
'''Parameters'''
 
 
 
* '''asName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) — Name of the entity.
 
 
 
'''Returns:'''
 
 
 
* <span style="font-family: monospace">bool</span> — if sleeping or not.
 
</div>
 
</div>
 
 
 
<div style="background: #202020; border: 1px solid black; margin-bottom: 20px;">
 
<h2 style="border-bottom: 1px solid black; background: #232339; margin: 0; padding: 6px 20px; font-family: monospace">Entity_SetIsOccluder</h2>
 
 
 
<div style="padding: 0 8px 8px 8px">
 
 
<syntaxhighlight lang="c++">void Entity_SetIsOccluder(const tString &in asName,
 
<syntaxhighlight lang="c++">void Entity_SetIsOccluder(const tString &in asName,
 
                           bool abOccluder)</syntaxhighlight>
 
                           bool abOccluder)</syntaxhighlight>
 +
{{CodeDocDetailBody|Set if entity is an occluder}}
 +
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity, Wildcard(s) * are supported *}}
 +
{{CodeDocDetailParam|abOccluder|bool|<nowiki>true = object is occluder</nowiki>}}
 +
{{CodeDocDetailReturn|void}}
 +
{{CodeDocDetailBottom}}
  
Set if entity is an occluder
+
{{CodeDocDetailTop|Entity_IsOccluder}}
 
 
'''Parameters'''
 
 
 
* '''asName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) — Name of the entity, Wildcard(s) * are supported *
 
* '''abOccluder''' (<span style="font-family: monospace">bool</span>) — true = object is occluder
 
 
 
'''Returns:'''
 
 
 
* <span style="font-family: monospace">void</span>
 
</div>
 
</div>
 
 
 
<div style="background: #202020; border: 1px solid black; margin-bottom: 20px;">
 
<h2 style="border-bottom: 1px solid black; background: #232339; margin: 0; padding: 6px 20px; font-family: monospace">Entity_IsOccluder</h2>
 
 
 
<div style="padding: 0 8px 8px 8px">
 
 
<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}}
 +
{{CodeDocDetailParam|asName|[[../../tString|tString]]|Name of the entity.}}
 +
{{CodeDocDetailReturn|bool|if entity is an occluder}}
 +
{{CodeDocDetailBottom}}
  
Get if an entity is an occluder
+
{{CodeDocDetailTop|Entity_IsInteractedWith}}
 
 
'''Parameters'''
 
 
 
* '''asName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) — Name of the entity.
 
 
 
'''Returns:'''
 
 
 
* <span style="font-family: monospace">bool</span> — if entity is an occluder
 
</div>
 
</div>
 
 
 
<div style="background: #202020; border: 1px solid black; margin-bottom: 20px;">
 
<h2 style="border-bottom: 1px solid black; background: #232339; margin: 0; padding: 6px 20px; font-family: monospace">Entity_IsInteractedWith</h2>
 
 
 
<div style="padding: 0 8px 8px 8px">
 
 
<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.}}
 +
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of the entity.}}
 +
{{CodeDocDetailReturn|bool|if the entity is being interacted with}}
 +
{{CodeDocDetailBottom}}
  
Checks if the entity is being interacted with.
+
{{CodeDocDetailTop|Entity_SetVarString}}
 
 
'''Parameters'''
 
 
 
* '''asName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) — name of the entity.
 
 
 
'''Returns:'''
 
 
 
* <span style="font-family: monospace">bool</span> — if the entity is being interacted with
 
</div>
 
</div>
 
 
 
<div style="background: #202020; border: 1px solid black; margin-bottom: 20px;">
 
<h2 style="border-bottom: 1px solid black; background: #232339; margin: 0; padding: 6px 20px; font-family: monospace">Entity_SetVarString</h2>
 
 
 
<div style="padding: 0 8px 8px 8px">
 
 
<syntaxhighlight lang="c++">void Entity_SetVarString(const tString &in asEntityName,
 
<syntaxhighlight lang="c++">void Entity_SetVarString(const tString &in asEntityName,
 
                         const tString &in asVarName,
 
                         const tString &in asVarName,
 
                         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. *}}
Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName. *
+
{{CodeDocDetailParam|asEntityName|[[../../tString|tString]]|}}
 
+
{{CodeDocDetailParam|asVarName|[[../../tString|tString]]|}}
'''Parameters'''
+
{{CodeDocDetailParam|asX|[[../../tString|tString]]|}}
 
+
{{CodeDocDetailReturn|void}}
* '''asEntityName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) —
+
{{CodeDocDetailBottom}}
* '''asVarName''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) —
 
* '''asX''' (<span style="font-family: monospace">[[../../tString|tString]]</span>) —
 
 
 
'''Returns:'''
 
 
 
* <span style="font-family: monospace">void</span>
 
</div>
 
</div>
 
  
 
__NOTOC__
 
__NOTOC__

Revision as of 18:24, 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

  • 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

  • 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

  • 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.

  • 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. *

Returns:

  • void