<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FProps_Helper</id>
	<title>HPL3/SOMA/Scripting/Props Helper - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FProps_Helper"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Props_Helper&amp;action=history"/>
	<updated>2026-10-04T04:28:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Props_Helper&amp;diff=7218&amp;oldid=prev</id>
		<title>TiMan: Add a sourced SOMA guide with explanations and stock-script examples.</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/Props_Helper&amp;diff=7218&amp;oldid=prev"/>
		<updated>2026-10-02T12:09:52Z</updated>

		<summary type="html">&lt;p&gt;Add a sourced SOMA guide with explanations and stock-script examples.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{shortPageTitle}}&lt;br /&gt;
&lt;br /&gt;
The Props helper file in SOMA is &amp;lt;code&amp;gt;script/helpers/helper_props.hps&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Prop helpers include opening swing doors with impulses, querying the grabbed prop and setting selected entities’ interaction icons. Grab_GetGrabbedProp returns null when no prop is grabbed.&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
# Open the map script inside your own mod. Keep its generated includes, &amp;lt;code&amp;gt;cScrMap : iScrMap&amp;lt;/code&amp;gt; class and callback structure. See [[HPL3/SOMA/Getting Started/Add Your First Script|Add your first script]] if you have not edited a map script yet.&lt;br /&gt;
# Add the helper include shown below alongside the script’s other includes.&lt;br /&gt;
# Read the stock example before copying its calls: named entities, voice subjects, materials and callbacks must belong to the map or resources you are using.&lt;br /&gt;
&lt;br /&gt;
== Follow the stock example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;helpers/helper_props.hps&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SwingDoor_PushOpen ===&lt;br /&gt;
Pushes a door open using one or many impulses&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;asName&amp;lt;/code&amp;gt; || name of the door.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;afImpulseAmount&amp;lt;/code&amp;gt; || Amount of impulse that will be applied to the door.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;alNumOfTimes&amp;lt;/code&amp;gt; || Number of times the impulse will be applied.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;afTimeBetweenPushes&amp;lt;/code&amp;gt; || Pause interval between two impulses.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;maps/chapter04/04_02_tau_inside/04_02_tau_inside.hps&amp;lt;/code&amp;gt;, SOMA calls &amp;lt;code&amp;gt;SwingDoor_PushOpen&amp;lt;/code&amp;gt; as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
SwingDoor_PushOpen(asTimer, 0.02, 90,0.2);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Value in this stock call&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;asName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;asTimer&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;afImpulseAmount&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;0.02&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;alNumOfTimes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;90&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;afTimeBetweenPushes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an excerpt from that stock script; its referenced names and variables belong to that script.&lt;br /&gt;
&lt;br /&gt;
=== Grab_GetGrabbedProp ===&lt;br /&gt;
Returns the currently grabbed prop, or null if there isn't one.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;script/props/Prop_Grab.hps&amp;lt;/code&amp;gt;, SOMA calls &amp;lt;code&amp;gt;Grab_GetGrabbedProp&amp;lt;/code&amp;gt; as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
cLuxProp@ pProp = Grab_GetGrabbedProp();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an excerpt from that stock script; its referenced names and variables belong to that script.&lt;br /&gt;
&lt;br /&gt;
=== Entity_SetCustomInteractIcon ===&lt;br /&gt;
Sets the interaction icon for an entity. Currently only works for MoveBody,&lt;br /&gt;
MoveableButton, Lever, Rigid and Triggers.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;asName&amp;lt;/code&amp;gt; || name of the entity.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;aIcon&amp;lt;/code&amp;gt; || The interaction icon.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Check your change ==&lt;br /&gt;
Save the script and restart the map in development mode with &amp;lt;code&amp;gt;F5&amp;lt;/code&amp;gt;. If the script fails, open &amp;lt;code&amp;gt;F1&amp;lt;/code&amp;gt; and use '''Show Error List''' or '''Show HPL Log'''. See [[HPL3/SOMA/Getting Started/Test Debug and Continue|the development loop]] for the launch and debugging steps.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[HPL3/SOMA/Scripting|SOMA scripting]]&lt;br /&gt;
* [[HPL3/SOMA/Scripting/Scripting Api|SOMA scripting API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>