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

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
Jump to navigation Jump to search
(Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Summary== {{CodeDocSummaryTop}} {{CodeDocSummaryIte...")
 
(Fixed typo on afState's description (It's supposed to be the door's position, not a lock or unlocked state))
 
Line 1: Line 1:
−
{{ScriptingStub}}
+
Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!
  
−
Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!
+
''Note: The official documentation for these functions had a typo where it wrongly documented the use of 'afState' in the function.''
  
 
==Summary==
 
==Summary==
Line 16: Line 16:
 
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of move object}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of move object}}
−
{{CodeDocDetailParam|afState|float|true <nowiki>=</nowiki> locked - false <nowiki>=</nowiki> unlocked.}}
+
{{CodeDocDetailParam|afState|float|the position of the door you want to set it to (between 0.0f and 1.0f).}}
 
{{CodeDocDetailReturn|void|}}
 
{{CodeDocDetailReturn|void|}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
Line 30: Line 30:
 
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParamStart}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of move object}}
 
{{CodeDocDetailParam|asName|[[../../tString|tString]]|name of move object}}
−
{{CodeDocDetailParam|afState|float|true <nowiki>=</nowiki> locked - false <nowiki>=</nowiki> unlocked.}}
+
{{CodeDocDetailParam|afState|float|the position of the door you want to set it to (between 0.0f and 1.0f).}}
 
{{CodeDocDetailParam|afAcc|float|the acceleration of the movement}}
 
{{CodeDocDetailParam|afAcc|float|the acceleration of the movement}}
 
{{CodeDocDetailParam|afMaxSpeed|float|the max speed.}}
 
{{CodeDocDetailParam|afMaxSpeed|float|the max speed.}}

Latest revision as of 17:23, 30 May 2024

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Note: The official documentation for these functions had a typo where it wrongly documented the use of 'afState' in the function.

Summary

Return Type Function and Description
void MoveObject_SetState(const tString &in asName, float afState)
Sets the state of the move object
void MoveObject_SetStateExt(const tString &in asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed)
Sets the state of the move object

Function Detail

MoveObject_SetState

void MoveObject_SetState(const tString &in asName,
                         float afState)

Sets the state of the move object. This makes it move to a certain postion between
min or max pos (or outside of that is <0 or >1).

Parameters

  • asName (tString) — name of move object
  • afState (float) — the position of the door you want to set it to (between 0.0f and 1.0f).

Returns:

  • void

MoveObject_SetStateExt

void MoveObject_SetStateExt(const tString &in asName,
                            float afState,
                            float afAcc,
                            float afMaxSpeed,
                            float afSlowdownDist,
                            bool abResetSpeed)

Sets the state of the move object. This makes it move to a certain postion between
min or max pos (or outside of that is <0 or >1).
This will also set the speeed and acc at which the movement occurs.

Parameters

  • asName (tString) — name of move object
  • afState (float) — the position of the door you want to set it to (between 0.0f and 1.0f).
  • afAcc (float) — the acceleration of the movement
  • afMaxSpeed (float) — the max speed.
  • afSlowdownDist (float) — the distance from the state postion that it will start slowing to a halt.
  • abResetSpeed (bool) — if the previous speed should be reset.

Returns:

  • void