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 1: Line 1:
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1">Entity_GetAutoSleep</h2>
+
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1; background: #656575; margin: 40px 0 16px; padding: 8px 20px; font-family: monospace">Entity_GetAutoSleep</h2>
  
 
Get if an entity automatically falls asleep when it isnt active
 
Get if an entity automatically falls asleep when it isnt active
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Parameters</span>-->
+
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
 +
 
 
'''Parameters'''
 
'''Parameters'''
  
 
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
 
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Returns:</span>-->
 
 
'''Returns:'''
 
'''Returns:'''
  
 
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
 
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
  
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
+
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1; background: #656575; margin: 40px 0 16px; padding: 8px 20px; font-family: monospace">Entity_SetIsOccluder</h2>
  
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1">Entity_GetAutoSleep</h2>
+
Set if entity is an occluder
  
Get if an entity automatically falls asleep when it isnt active
+
<syntaxhighlight lang="c++">void Entity_SetIsOccluder(const tString &in asName,
 +
                          bool abOccluder)</syntaxhighlight>
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Parameters</span>-->
 
 
'''Parameters'''
 
'''Parameters'''
  
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
+
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity, Wildcard(s) * are supported *
 +
* '''abOccluder''' <syntaxhighlight lang="c++" inline>(bool)</syntaxhighlight> — true = object is occluder
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Returns:</span>-->
 
 
'''Returns:'''
 
'''Returns:'''
  
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
+
* <syntaxhighlight lang="c++" inline>void</syntaxhighlight>
  
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
+
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1; background: #656575; margin: 40px 0 16px; padding: 8px 20px; font-family: monospace">Entity_IsOccluder</h2>
  
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1">Entity_GetAutoSleep</h2>
+
Get if an entity is an occluder
  
Get if an entity automatically falls asleep when it isnt active
+
<syntaxhighlight lang="c++">bool Entity_IsOccluder(const tString &in asName)</syntaxhighlight>
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Parameters</span>-->
 
 
'''Parameters'''
 
'''Parameters'''
  
 
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
 
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Returns:</span>-->
 
 
'''Returns:'''
 
'''Returns:'''
  
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
+
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if entity is an occluder
  
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
+
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1; background: #656575; margin: 40px 0 16px; padding: 8px 20px; font-family: monospace">Entity_IsInteractedWith</h2>
  
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1">Entity_GetAutoSleep</h2>
+
Checks if the entity is being interacted with.
  
Get if an entity automatically falls asleep when it isnt active
+
<syntaxhighlight lang="c++">bool Entity_IsInteractedWith(const tString &in asName)</syntaxhighlight>
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Parameters</span>-->
 
 
'''Parameters'''
 
'''Parameters'''
  
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
+
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — name of the entity.
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Returns:</span>-->
 
 
'''Returns:'''
 
'''Returns:'''
  
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
+
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if the entity is being interacted with
  
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
+
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1; background: #656575; margin: 40px 0 16px; padding: 8px 20px; font-family: monospace">Entity_SetVarString</h2>
  
<h2 style="border-top: 0.5px solid #a2a9b1; border-bottom: 0.5px solid #a2a9b1">Entity_GetAutoSleep</h2>
+
Sets the value of an entity string variable. Wildcard(s) * are supported for EntityName. *
  
Get if an entity automatically falls asleep when it isnt active
+
<syntaxhighlight lang="c++">void Entity_SetVarString(const tString &in asEntityName,
 +
                        const tString &in asVarName,
 +
                        const tString &in asX)</syntaxhighlight>
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Parameters</span>-->
 
 
'''Parameters'''
 
'''Parameters'''
  
* '''asName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> — Name of the entity.
+
* '''asEntityName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> —
 +
* '''asVarName''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> —
 +
* '''asX''' <syntaxhighlight lang="c++" inline>(const tString &in)</syntaxhighlight> —  
  
<!--<span style="font-size: 1.2em; font-weight: bold; line-height: 1.6; color: #bbbbbb">Returns:</span>-->
 
 
'''Returns:'''
 
'''Returns:'''
  
* <syntaxhighlight lang="c++" inline>bool</syntaxhighlight> — if sleeping or not.
+
* <syntaxhighlight lang="c++" inline>void</syntaxhighlight>
 
 
<syntaxhighlight lang="c++">bool Entity_GetAutoSleep(const tString &in asName)</syntaxhighlight>
 
  
 
__FORCETOC__
 
__FORCETOC__

Revision as of 03:32, 10 August 2020

Entity_GetAutoSleep

Get if an entity automatically falls asleep when it isnt active

bool Entity_GetAutoSleep(const tString &in asName)

Parameters

  • asName (const tString &in) — Name of the entity.

Returns:

  • bool — if sleeping or not.

Entity_SetIsOccluder

Set if entity is an occluder

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

Parameters

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

Returns:

  • void

Entity_IsOccluder

Get if an entity is an occluder

bool Entity_IsOccluder(const tString &in asName)

Parameters

  • asName (const tString &in) — Name of the entity.

Returns:

  • bool — if entity is an occluder

Entity_IsInteractedWith

Checks if the entity is being interacted with.

bool Entity_IsInteractedWith(const tString &in asName)

Parameters

  • asName (const tString &in) — name of the entity.

Returns:

  • bool — if the entity is being interacted with

Entity_SetVarString

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

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

Parameters

  • asEntityName (const tString &in)
  • asVarName (const tString &in)
  • asX (const tString &in)

Returns:

  • void