<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Krutzelpuntz</id>
	<title>Frictional Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Krutzelpuntz"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page/Special:Contributions/Krutzelpuntz"/>
	<updated>2026-04-03T23:06:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6440</id>
		<title>HPL2/Engine Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6440"/>
		<updated>2023-08-20T11:54:26Z</updated>

		<summary type="html">&lt;p&gt;Krutzelpuntz: /* Quests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
&lt;br /&gt;
This page documents all scripts available in Amnesia: The Dark Descent.&lt;br /&gt;
&lt;br /&gt;
{{note|'''Note''': Some of the functions require the Amnesia 1.3 update. Steam and other online store copies should be automatically updated. Other copies can get it [http://www.frictionalgames.com/forum/thread-24334.html here].}}&lt;br /&gt;
&lt;br /&gt;
==Engine scripts==&lt;br /&gt;
===Main===&lt;br /&gt;
&lt;br /&gt;
The following functions are the main hps functions that the HPL2 engine looks to run on certain events - similar to the C++ int main() function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void OnStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the map is loaded for the first time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnEnter();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs whenever the player enters a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnLeave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the player leaves a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnGameStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is found in the global.hps file and the inventory.hps file, and is run when the game is first started by the player (ie via &amp;quot;Start New Game&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float RandFloat(float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random float.&lt;br /&gt;
&lt;br /&gt;
#''afMin ''- minimum value&lt;br /&gt;
#''afMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int RandInt(int alMin, int alMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random int. Note: the maximum value is ''inclusive''  - the RandInt() function may return this value.&lt;br /&gt;
&lt;br /&gt;
#''alMin ''- minimum value&lt;br /&gt;
#''alMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringContains(string&amp;amp; asString, string&amp;amp; asSubString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a string contains the specified string. &amp;lt;br /&amp;gt;Example: searching for &amp;quot;hello&amp;quot; in &amp;quot;hello world&amp;quot; would return '''true'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to check&lt;br /&gt;
#''asSubString ''- the string to search for&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; StringSub(string&amp;amp; asString, int alStart, int alCount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the substring in a string. &amp;lt;br /&amp;gt;Example: in the string &amp;quot;frictional games rocks&amp;quot;, using 4 as ''alStart''  and 6 as ''alCount''  would return '''&amp;quot;tional&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string&lt;br /&gt;
#''alStart ''- start position in the string&lt;br /&gt;
#''alCount ''- amount of characters&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int StringToInt(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns an integer converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float StringToFloat(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a float converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringToBool(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a boolean converted from a string, else returns false.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&lt;br /&gt;
===Mathematical Operations===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathCos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathTan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAsin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAcos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan2(float afX, float afY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Calculates and returns the arc tangent of the specified values.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - First value to operate.&lt;br /&gt;
#''afY''  - Second value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSqrt(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the square root of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathPow(float afBase, float afExp);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of afBase raised to the power of afExp.&lt;br /&gt;
&lt;br /&gt;
#''afBase''  - The base value.&lt;br /&gt;
#''afExp''  - Value to calculate the base with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMin(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the lowest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMax(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the highest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathClamp(float afX, float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns afX clamped between afMin and afMax. If afX &amp;lt; afMin, returns afMin, and if afX &amp;gt; afMax, returns afMax.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - The value to clamp.&lt;br /&gt;
#''afMin''  - The minimum value to clamp afX with.&lt;br /&gt;
#''afMax''  - The maximum value to clamp afX with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAbs(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the absolute value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Print(string&amp;amp; asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the log file (''hpl.log'').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDebugMessage(string&amp;amp; asString, bool abCheckForDuplicates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the debug console.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to print&lt;br /&gt;
#''abCheckForDuplicates ''- if true, the string won't be printed more than once on screen until it disappears&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ProgLog(string&amp;amp; asLevel, string&amp;amp; asMessage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints an entry to the ProgLog (progression log). &amp;lt;br /&amp;gt;ProgLog is a file created in Documents/Amnesia/main (or an FC folder if one is being used). It logs certain events, such us opening the menu or picking up the lantern, as well as the player's state (Health, Sanity, Oil, Tinderboxes, Coins), for the purpose of documenting a tester's playstyle. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;This function allows to log custom messages.The messages in the ProgLog file are sorted by time elapsed since a map was loaded.&lt;br /&gt;
&lt;br /&gt;
ProgLog has to be enabled for a player profile in ''user_settings.cfg''  before it starts working.&lt;br /&gt;
&lt;br /&gt;
#''asLevel ''- can be &amp;quot;Low&amp;quot;, &amp;quot;Medium&amp;quot; or &amp;quot;High&amp;quot;. It's a tag which appears in each log entry, for event prioritising.&lt;br /&gt;
#''asMessage ''- The custom message to be printed to the log.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool ScriptDebugOn();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the debug mode is enabled. &amp;lt;br /&amp;gt;See [[HPL2/Development_Environment|&amp;quot;Setting up Development Environment&amp;quot;]] to setup debug mode on your own computer.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
{{warning|Regular variables (int, float, etc.) are '''not''' saved by the game. Using them in important parts of yor script will break it upon loading a game save. In HPL, those variables should only be used for disposable counters, like spawning objects in a &amp;quot;for&amp;quot; loop. For variables which need to be saved, use the wrappers as described below.}}&lt;br /&gt;
&lt;br /&gt;
====Local====&lt;br /&gt;
&lt;br /&gt;
Local variables can be used throughout the same script file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetLocalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetLocalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddLocalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetLocalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Global====&lt;br /&gt;
&lt;br /&gt;
Global variables can be used throughout several maps and can be accessed by several script files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetGlobalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetGlobalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddGlobalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetGlobalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Particle Systems===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadParticleSystem(string&amp;amp; asPSFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asPSFile''  - The particle system file to load. Extension: .ps&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntity(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntityExt(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS,&lt;br /&gt;
float afR, float afG, float afB, float afA, bool abFadeAtDistance, float afFadeMinEnd, float afFadeMinStart,&lt;br /&gt;
float afFadeMaxStart, float afFadeMaxEnd);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity, extended method with more options.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''abFadeAtDistance ''- determines whether a particle system fades from a certain distance on&lt;br /&gt;
#''afFadeMinEnd ''- minimum distance at which the particle system stops fading&lt;br /&gt;
#''afFadeMinStart ''- minimum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxStart ''- maximum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxEnd ''- maximum distance at which the particle system stops fading&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DestroyParticleSystem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Destroys a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - The internal name of the particle system&lt;br /&gt;
&lt;br /&gt;
===Sounds &amp;amp; Music===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadSound(string&amp;amp; asSoundFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundFile''  - The sound file to load. Extension: .snt&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaySoundAtEntity(string&amp;amp; asSoundName, string&amp;amp; asSoundFile, string&amp;amp; asEntity, float afFadeTime, bool abSaveSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a sound on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''asSoundFile ''- the sound to use + extension .snt&lt;br /&gt;
#''asEntity ''- the entity to create the sound at, can be &amp;quot;Player&amp;quot;&lt;br /&gt;
#''afFadeTime ''- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f&lt;br /&gt;
#''abSaveSound ''- if ''true'', a looping sound will &amp;quot;remember&amp;quot; its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If ''true'', the sound is never attached to the entity! Note that saving should only be used on ''looping sounds''!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeInSound(string&amp;amp; asSoundName, float afFadeTime, bool abPlayStart);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades in a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds&lt;br /&gt;
#''abPlayStart ''- ?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopSound(string&amp;amp; asSoundName, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades out a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds, use 0 to immediatly stop the sound&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayMusic(string&amp;amp; asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays music.&lt;br /&gt;
&lt;br /&gt;
#''asMusicFile ''- the music to play + extension .ogg&lt;br /&gt;
#''abLoop ''- determines whether a music track should loop&lt;br /&gt;
#''afVolume ''- volume of the music&lt;br /&gt;
#''afFadeTime ''- time in seconds until music reaches full volume&lt;br /&gt;
#''alPrio ''- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.&lt;br /&gt;
#''abResume''  - if ''true'', playback will be continued from where the track stopped after the call to StopMusic(); if ''false'', the track will be restarted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopMusic(float afFadeTime, int alPrio);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops music.&lt;br /&gt;
&lt;br /&gt;
#''afFadeTime ''- time in seconds until music stops&lt;br /&gt;
#''alPrio ''- the priority of the music that should stop&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundVolume(float afDestVolume, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound volume, that means everything you can hear '''from the world'''. This does not affect music of GUI sounds.&lt;br /&gt;
&lt;br /&gt;
#''afDestVolume ''- desired volume&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired volume&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundSpeed(float afDestSpeed, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound speed.&lt;br /&gt;
&lt;br /&gt;
#''afDestSpeed ''- desired speed&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired speed&lt;br /&gt;
&lt;br /&gt;
===Lights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightVisible(string&amp;amp; asLightName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/disables lights.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''abVisible ''- determines the state of the light&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeLightTo(string&amp;amp; asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the properties of a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''afRadius ''- radius of the light. -1 means keeping the radius&lt;br /&gt;
#''afTime ''- time in seconds until change is done&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightFlickerActive(string&amp;amp; asLightName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates flickering on a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName''  - The internal light name&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&lt;br /&gt;
==Game scripts==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartCredits(string&amp;amp; asMusic, bool abLoopMusic, string&amp;amp; asTextCat, string&amp;amp; asTextEntry, int alEndNum);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end credits screen.&lt;br /&gt;
&lt;br /&gt;
#''asMusic ''- the music to play (including .ogg)&lt;br /&gt;
#''abLoopMusic ''- determines whether the music should loop&lt;br /&gt;
#''asTextCat ''- the category to be used in the .lang file&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alEndNum ''- Amnesia has 3 different endings and displays a code at the bottom. Determines which code is displayed. 0-2 will display codes, any other integer will not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartDemoEnd();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end images that are used in the demo, images are named &amp;quot;demo_end01.jpg&amp;quot;, increase the number for each image you want to use. (NEEDS VERIFICATION)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AutoSave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the game to the auto save.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CheckPoint (string&amp;amp; asName, string&amp;amp; asStartPos, string&amp;amp; asCallback, string&amp;amp; asDeathHintCat, string&amp;amp; asDeathHintEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets a checkpoint at which the player will respawn in case he dies. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asName, int alCount)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Count is 0 on the first checkpoint load!&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the internal name&lt;br /&gt;
#''asStartPos ''- the name of the StartPos in the editor&lt;br /&gt;
#''asCallback ''- the function to call when the player dies/respawns&lt;br /&gt;
#''asDeathHintCat ''- the category of the death hint message to be used in the .lang file&lt;br /&gt;
#''asDeathHintEntry ''- the entry in the .lang file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeMap(string&amp;amp; asMapName, string&amp;amp; asStartPos, string&amp;amp; asStartSound, string&amp;amp; asEndSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediatly loads another map.&lt;br /&gt;
&lt;br /&gt;
#''asMapName ''- the file to load&lt;br /&gt;
#''asStartPos ''- the name of the StartPos on the next map&lt;br /&gt;
#''asStartSound ''- the sound that is played when the change starts&lt;br /&gt;
#''asEndSound ''- the sound that is played when the new map is loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ClearSavedMaps();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the &amp;quot;history&amp;quot; of the save, useful to do when you know the player will not be able to go back anymore. Makes the next save much smaller in size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateDataCache();&lt;br /&gt;
void DestroyDataCache();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This caches all current textures and models and they are not released until destroy is called. If there is already cached data it is destroyed.&lt;br /&gt;
Create caches to enable faster loading when going back to a map. Destroy the cache if you know the player won't go back to that map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMapDisplayNameEntry(string&amp;amp; asNameEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the map name shown in save file names. If none is set NULL is assumed.&lt;br /&gt;
&lt;br /&gt;
#''asNameEntry ''- the entry to display, category must be &amp;quot;Levels&amp;quot;!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the skybox.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxTexture(string&amp;amp; asTexture);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the texture of the skybox.&lt;br /&gt;
&lt;br /&gt;
#''asTexture''  - The texture file to set. Extension: .dds&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the solid color of the skybox rather than a texture.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the global fog.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the color to use for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the properties for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afStart ''- how many meters from the camera should the fog begin&lt;br /&gt;
#''afEnd ''- how many meters from the camera should the fog reach full thickness&lt;br /&gt;
#''afFalloffExp ''- the amount by which the thinkness increases&lt;br /&gt;
#''abCulling ''- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetupLoadScreen(string&amp;amp;asTextCat, string&amp;amp;asTextEntry, int alRandomNum, string&amp;amp;asImageFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which loading screen will be shown when changing maps.&lt;br /&gt;
&lt;br /&gt;
#''asTextCat ''- the category of the loading text in the .lang file to be shown on the loading screen&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alRandomNum ''- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If &amp;lt; =1 then no suffix is added&lt;br /&gt;
#''asImageFile ''- the image to be shown (optional)&lt;br /&gt;
&lt;br /&gt;
===Game Timer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddTimer(string&amp;amp; asName, float afTime, string&amp;amp; asFunction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a timer which calls a function when it expires. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asTimer)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the name of the timer&lt;br /&gt;
#''afTime ''- time in seconds&lt;br /&gt;
#''asFunction ''- the function to call&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveTimer(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a timer, no matter how much time is left.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetTimerTimeLeft(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the time left on a timer.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&lt;br /&gt;
===Screen Effects===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeOut(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to black.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen is completly black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeIn(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen back to normal.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeImageTrailTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies the image trail effect to the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeSepiaColorTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the screen go dark red.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeRadialBlurTo(float afSize, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies radial blur effects to the screen.&lt;br /&gt;
&lt;br /&gt;
''afSize ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetRadialBlurStartDist(float afStartDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines at which distance the radial blur effects appear.&lt;br /&gt;
&lt;br /&gt;
''afStartDist ''- the distance at which the effect starts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn ''- time in seconds until screen is white &amp;lt;br /&amp;gt;''afWhite ''- determines to which percentage the screen fades to white (1.0 = completly white) &amp;lt;br /&amp;gt;''afFadeOut ''- time in seconds until screen is back to normal again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectEmotionFlash(string&amp;amp; asTextCat, string&amp;amp; asTextEntry, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white and shows a text message.&lt;br /&gt;
&lt;br /&gt;
''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''asSound ''- the sound to play while fading&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddEffectVoice(string&amp;amp; asVoiceFile, string&amp;amp; asEffectFile, string&amp;amp; asTextCat, string&amp;amp; asTextEntry,&lt;br /&gt;
bool abUsePosition, string&amp;amp; asPosEntity, float afMinDistance, float afMaxDistance);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.&lt;br /&gt;
&lt;br /&gt;
''asVoiceFile ''- the voice to play &amp;lt;br /&amp;gt;''asEffectFile ''- the effect to play &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''abUsePosition ''- plays using 3D from the entity, or without 3D &amp;lt;br /&amp;gt;''asPosEntity ''- the entity at which the effect appears &amp;lt;br /&amp;gt;''afMinDistance ''- minimum distance to see the effect &amp;lt;br /&amp;gt;''afMaxDistance ''- maximum distance to see the effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopAllEffectVoices(float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all voices and calls the EffectVoiceOverCallback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEffectVoiceActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether EffectVoices are still active.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetEffectVoiceOverCallback(string&amp;amp; asFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to be called when the EffectVoices are finished. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetFlashbackIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a flashback is still in effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerSpawnPS(string&amp;amp; asSPSFile);&lt;br /&gt;
void StopPlayerSpawnPS();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuously spawn regular particle systems (''.ps'') around the player. Particles created by this script carry over from map to map. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;''asSPSFile''  - the ''.sps''  file to use. Exemplary ''.sps''  files are located in the ''/misc''  folder in the main game directory. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;Custom ''.sps''  files can be created by hand in a text editor (see existing ones and mimic how those are written). &amp;lt;br /&amp;gt;Since ''StopPlayerSpawnPS()''  doesn't seem to work, to stop an SPS you must create an ''.sps''  file with an empty particle field field and override the old SPS by calling ''StartPlayerSpawnPS''  again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayGuiSound(string&amp;amp; asSoundFile, float afVolume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays a sound, not using 3D.&lt;br /&gt;
&lt;br /&gt;
''asSoundFile ''- the sound to play (extension is .snt) &amp;lt;br /&amp;gt;''afVolume ''- the volume of the sound&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shakes the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity of the shake &amp;lt;br /&amp;gt;''afTime ''- duration of the shake &amp;lt;br /&amp;gt;''afFadeInTime ''- time in seconds until full intensity is reached &amp;lt;br /&amp;gt;''afFadeOutTime ''- time until screen is back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInDarknessEffectsActive(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the sanity drain and night vision effects while in the darkness.&lt;br /&gt;
&lt;br /&gt;
''bool abX''  - Enable/disable effects.&lt;br /&gt;
&lt;br /&gt;
===Insanity===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInsanitySetEnabled(string&amp;amp; asSet, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which InsanitySets are enabled.&lt;br /&gt;
&lt;br /&gt;
''asSet ''- the set &amp;lt;br /&amp;gt;''abX ''- enabled or not&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartInsanityEvent(string &amp;amp;in asEventName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Starts a specified insanity event.&lt;br /&gt;
&lt;br /&gt;
''asEventName ''- Insanity event to play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartRandomInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts a random insanity event from the available sets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopCurrentInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Stops the currently playing insanity event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void InsanityEventIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an insanity event is currently in effect… Or so it was supposed to be, but as it doesn't return a value, we can never know [http://wiki.frictionalgames.com/lib/images/smileys/icon_smile.gif?nolink&amp;amp;15x15]&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
&lt;br /&gt;
Note that the player's maximum health and sanity is 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled/Disable player controlled movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangePlayerStateToNormal();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets certain effects back to normal. It can for example make the player drop an item.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerCrouching(bool abCrouch);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''abUseLocalCoords ''- If true, axes are based on where the player is facing, not the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowPlayerCrossHairIcons(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the icons when a player has something in focus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerSanity(float afSanity);&lt;br /&gt;
void AddPlayerSanity(float afSanity);&lt;br /&gt;
float GetPlayerSanity();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerHealth(float afHealth);&lt;br /&gt;
void AddPlayerHealth(float afHealth);&lt;br /&gt;
float GetPlayerHealth();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerLampOil(float afOil);&lt;br /&gt;
void AddPlayerLampOil(float afOil);&lt;br /&gt;
float GetPlayerLampOil();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the lamp oil of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerSpeed();&lt;br /&gt;
float GetPlayerYSpeed();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current speed of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSanityDrainDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables sanity drain from darkness, monsters, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityBoost();&lt;br /&gt;
void GiveSanityBoostSmall();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Boosts the player's sanity by a fixed amount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityDamage(float afAmount, bool abUseEffect);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of sanity damage done &amp;lt;br /&amp;gt;''abUseEffect ''- determines whether an effect is played when the sanity damage is dealt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GivePlayerDamage(float afAmount, string&amp;amp; asType, bool abSpinHead, bool abLethal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the health of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of damage done to health &amp;lt;br /&amp;gt;''asType ''- plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash) &amp;lt;br /&amp;gt;''abSpinHead ''- changes the camera view when damage is dealt &amp;lt;br /&amp;gt;''abLethal ''- set to true if player can die from given damage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerFOVMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the field of view of the player. A shorter FOV will create a zoom effect.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default FOV (1 is default) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerAspectMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default aspect (default is 1) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- angle of rotation of head, positive being counter-clockwise &amp;lt;br /&amp;gt;''afSpeedMul ''- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow) &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed of rotation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''afSpeed ''- speed at which the change happens &amp;lt;br /&amp;gt;''afSlowDownDist ''- distance at which to start slowing down (prevents the head from abruptly stopping)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerLookAt(string&amp;amp; asEntityName, float afSpeedMul, float afMaxSpeed, string&amp;amp; asAtTargetCallback);&lt;br /&gt;
void StopPlayerLookAt();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to look at a certain entity until StopPlayerLookAt is used.&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- the entity to look at &amp;lt;br /&amp;gt;''afSpeedMul ''- how fast should the player look at the entity &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed allowed &amp;lt;br /&amp;gt;''asAtTargetCallback ''- function to call when player looks at target&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerMoveSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerRunSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerLookSpeedMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the player's move/run/look speed. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpForceMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the player's jump multiplier. Higher values = higher jumps. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpDisabled(bool abX);&lt;br /&gt;
void SetPlayerCrouchDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to jump/crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportPlayer(string&amp;amp; asStartPosName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly teleports the player to the target StartPos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternActive(bool abX, bool abUseEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the player use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetLanternActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player currently uses his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternLitCallback(string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to call when the player uses his lantern. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;MyFunc(bool abLit)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message on the screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- determines how long the message is displayed. If time is &amp;lt; =0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetDeathHint(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the message that appears when the player dies.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DisableDeathStartSound();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the death sound when the player dies. This must be called directly before player is killed! The variable as soon as player dies too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerForward(float afAmount)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;REQUIRES THE 1.2 PATCH: JUSTINE&amp;quot; Moves the player forward. It needs to be called in a timer that updates 60 times / second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerFallDamageDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the player's ability to take fall damage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerPos(float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the player's position within the level.&lt;br /&gt;
&lt;br /&gt;
''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerPosX();&lt;br /&gt;
float GetPlayerPosY();&lt;br /&gt;
float GetPlayerPosZ();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the player's position within the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
===Journal===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddNote(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a note to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _Name and _Text and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDiary(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a diary to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _NameX and _TextY whereas X and Y are numbers of the parts (_Name1: first diary, _Text1: first page) and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ReturnOpenJournal(bool abOpenJournal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only called in the pickup diary callback! If true the journal displays the entry else not.&lt;br /&gt;
&lt;br /&gt;
===Quests===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a quest to the player's journal under mementos.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name to be used &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot;Quest_&amp;lt;texthere&amp;gt;_Text”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CompleteQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Completes a quest.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name of the quest &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot; Quest_&amp;lt;texthere&amp;gt;_Text ”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool QuestIsCompleted(string&amp;amp; asName);&lt;br /&gt;
bool QuestIsAdded(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a quest is completed/added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetNumberOfQuestsInMap(int alNumberOfQuests);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the number of quests in the map.&lt;br /&gt;
&lt;br /&gt;
''alNumberOfQuests ''- Amount of Quests&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveHint (string&amp;amp; asName, string&amp;amp; asMessageCat, string&amp;amp; asMessageEntry, float afTimeShown);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a hint on the player's screen.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name &amp;lt;br /&amp;gt;''asMessageCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asMessageEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTimeShown ''- time in seconds until the message disappears. If time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveHint (string&amp;amp; asName);&lt;br /&gt;
void BlockHint (string&amp;amp; asName);&lt;br /&gt;
void UnBlockHint (string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;Blocks&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;Unblocks a hint.&lt;br /&gt;
&lt;br /&gt;
===Inventory===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ExitInventory();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exits the inventory by force.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the player's ability to open his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a message at the bottom of the inventory screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- time in seconds until the message disappears. If life time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItem(string&amp;amp; asName, string&amp;amp; asType, string&amp;amp; asSubTypeName, string&amp;amp; asImageName, float afAmount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds an item to the inventory of the player. Note that the item does not have to exist as entity in the world to be able to do this.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asType ''- item type to give, Available types are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Puzzle&lt;br /&gt;
*Lantern&lt;br /&gt;
*Health&lt;br /&gt;
*Sanity&lt;br /&gt;
*LampOil&lt;br /&gt;
*Tinderbox&lt;br /&gt;
&lt;br /&gt;
''asSubTypeName ''- item name for .lang file &amp;lt;br /&amp;gt;''asImageName ''- the image which will appear in inventory. For example: &amp;lt;code&amp;gt;void GiveItem(&amp;quot;chemical_container_full_1&amp;quot;, &amp;quot;Puzzle&amp;quot;, &amp;quot;chemical_container_full&amp;quot;, &amp;quot;chemical_container_full.tga&amp;quot;, 1);&amp;lt;/code&amp;gt; will use the image from &amp;lt;code&amp;gt;graphics/item/chemical_container_full.tga&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount the item gives, - For example: Oil potions will fill the oil meter by this amount, Health potions will heal by this amount, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item from the player's inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool HasItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player has an item in his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItemFromFile(string&amp;amp; asName, string&amp;amp; asFileName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a single item to the player's inventory. This is meant to be used for debug mostly as it creates the actual item and then destroys it.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asFileName ''- item to give + extension (.ent)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddCombineCallback(string&amp;amp; asName, string&amp;amp; asItemA, string&amp;amp; asItemB, string&amp;amp; asFunction, bool abAutoRemove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to combine items in his inventory. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItemA, string &amp;amp;in asItemB)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name for the callback &amp;lt;br /&amp;gt;''asItemA ''- internal name of first item &amp;lt;br /&amp;gt;''asItemB ''- internal name of second item &amp;lt;br /&amp;gt;''asFunction ''- the function to call &amp;lt;br /&amp;gt;''abAutoRemove ''- determines whether the callback should be removed when the items are combined&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveCombineCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a combine callback. &amp;lt;br /&amp;gt;''asName''  - the internal name of the callback to be removed (as specified in AddCombineCallback)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddUseItemCallback(string&amp;amp; asName, string&amp;amp; asItem, string&amp;amp; asEntity, string&amp;amp; asFunction, bool abAutoDestroy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to use items on the world. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItem, string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asItem ''- internal name of the item &amp;lt;br /&amp;gt;''asEntity ''- entity to be able to use the item on &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abAutoDestroy ''- determines whether the item is destroyed when used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveUseItemCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item callback.&lt;br /&gt;
&lt;br /&gt;
===Entities===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityActive(string&amp;amp; asName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityVisible(string &amp;amp;in asName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity's visual mesh. The collision body remains.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity. &amp;lt;br /&amp;gt;''abActive''  - Activate/deactivate mesh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntityExists(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an entity exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCustomFocusCrossHair(string&amp;amp; asName, string&amp;amp; asCrossHair);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the crosshair that is used when focusing an entity.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCrossHair ''- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void CreateEntityAtArea(string&amp;amp; asEntityName, string&amp;amp; asEntityFile, string&amp;amp; asAreaName, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition).&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- internal name &amp;lt;br /&amp;gt;''asEntityFile ''- entity to be used extension .ent &amp;lt;br /&amp;gt;''asAreaName ''- the area to create the entity at &amp;lt;br /&amp;gt;''abFullGameSave ''- determines whether an entity &amp;quot;remembers&amp;quot; its state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ReplaceEntity(string &amp;amp;in asName, string &amp;amp;in asBodyName, string &amp;amp;in asNewEntityName, string &amp;amp;in asNewEntityFile, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Removes an entity and places a new one in its place.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to replace. &amp;lt;br /&amp;gt;''asBodyName''  - Name of the body of the entity to place the new entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''asNewEntityName''  - Name of the new entity. &amp;lt;br /&amp;gt;''asNewEntityFile''  - Name of the new entity file. Extension .ent. &amp;lt;br /&amp;gt;''abFullGameSave''  - Whether ALL properties of this entity should be saved throughout levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaceEntityAtEntity(string &amp;amp;in asName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBodyName, bool abUseRotation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to place. &amp;lt;br /&amp;gt;''asTargetEntity''  - Name of the other entity to place the first entity at. &amp;lt;br /&amp;gt;''asTargetBodyName''  - Name of the body of the entity to place the first entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''abUseRotation''  - Whether the entity should be rotated like the target entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPos(string &amp;amp;in asName, float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Moves an entity to a position in the level.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to move. &amp;lt;br /&amp;gt;''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetEntityPosX(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosY(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosZ(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns an entity's position in the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerLookAtCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveWhenLookedAt);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player looks at a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = looking, -1 = not looking&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveWhenLookedAt ''- determines whether the callback should be removed when the player looked at the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerInteractCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveOnInteraction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveOnInteraction ''- determines whether the callback should be removed when the player interacts with the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCallbackFunc(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, string &amp;amp;in type)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Type depends on entity type and includes: &amp;quot;OnPickup&amp;quot;, &amp;quot;Break&amp;quot;, &amp;quot;OnIgnite&amp;quot;, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityConnectionStateChangeCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A callback called when ever the connection state changes (button being switched on, lever switched, etc). &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void Func(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: -1 = off, 0 = between, 1 = on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityInteractionDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disallows interaction with an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BreakJoint (string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Breaks a joint. Do not use this on joints in SwingDoors, Levers, Wheels, etc. where the joint is part of an interaction. That will make the game crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void AddEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName, string&amp;amp; asFunction, bool abDeleteOnCollide, int alStates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when two entites collide. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asParent, string &amp;amp;in asChild, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = enter, -1 = leave&lt;br /&gt;
&lt;br /&gt;
''asParentName ''- internal name of main object &amp;lt;br /&amp;gt;''asChildName ''- internal name of object that collides with main object (asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) NOT supported!) &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abDeleteOnCollide ''- determines whether the callback after it was called &amp;lt;br /&amp;gt;''alStates ''- 1 = only enter, -1 = only leave, 0 = both&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an EntityCollideCallback. Asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) not supported in ''asChildName''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntitiesCollide(string&amp;amp; asEntityA, string&amp;amp; asEntityB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether two entites collide. This function does NOT support asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) or &amp;quot;Player&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetBodyMass(string &amp;amp;in asName, float afMass);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetBodyMass(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to get.&lt;br /&gt;
&lt;br /&gt;
====Props====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropEffectActive(string&amp;amp; asName, bool abActive, bool abFadeAndPlaySounds);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on coal to give it the black color it should have.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropActiveAndFade(string&amp;amp; asName, bool abActive, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates a prop.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''abActive ''- nothing to add &amp;lt;br /&amp;gt;''afFadeTime ''- time in seconds until prop fully fades&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropStaticPhysics(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates the physics of a prop. Setting as true will make entities static in midair.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetPropIsInteractedWith(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a prop is interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RotatePropToSpeed(string&amp;amp; asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string&amp;amp; asOffsetArea);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the prop up to a set speed.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afGoalSpeed ''- desired speed &amp;lt;br /&amp;gt;''afAxisX ''- rotation around X axis &amp;lt;br /&amp;gt;''afAxisY ''- rotation around Y axis &amp;lt;br /&amp;gt;''afAxisZ ''- rotation around Z axis &amp;lt;br /&amp;gt;''abResetSpeed ''- determines whether the speed is resetted after goal speed is reached &amp;lt;br /&amp;gt;''asOffsetArea ''- the area to rotate around, if empty, then the center of the body is used Note: The entity you want to rotate MUST be a &amp;quot;StaticObject&amp;quot; entity!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void StopPropMovement(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all movement of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddAttachedPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop.&lt;br /&gt;
&lt;br /&gt;
a''sPropName''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
{{bug|''afRotZ '' is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using: &amp;lt;br /&amp;gt;''AddAttachedPropToProp(asPropName, asAttachName, asAttachFile, afPosX, afPosY, '''0''', afPosZ, '''90.0f''', afPosZ)''}}&lt;br /&gt;
&lt;br /&gt;
{{bug|Attaching a breakable prop to a physically active prop, and then breaking the attached prop, will cause the game to crash, should the parent object be moved or reset.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop. Fixed version of AddAttachedPropToProp.&lt;br /&gt;
&lt;br /&gt;
''asPropName ''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveAttachedPropFromProp(string&amp;amp; asPropName, string&amp;amp; asAttachName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches a prop from a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
void AddPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
float GetPropHealth(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ResetProp(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resets a prop's state to the original one when the map was loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void PlayPropAnimation(string&amp;amp; asProp, string&amp;amp; asAnimation, float afFadeTime, bool abLoop, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the prop play an animation and calls a function. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asProp)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asProp ''- internal name of the prop &amp;lt;br /&amp;gt;''asAnimation ''- animation to play &amp;lt;br /&amp;gt;''afFadeTime ''- ? &amp;lt;br /&amp;gt;''abLoop ''- determines whether the animation loops &amp;lt;br /&amp;gt;''asCallback ''- function to call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddPropForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddPropImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions push objects. Note that rather high values are needed when applying ''forces''  (on the order of ~100 (weak) to ~10000 (strong)), but not impulses (values less than 10 can be appropriate). Forces are external influences, and will have different effect depending on the mass of the object they are being applied to; impulses disregard mass, and can cause objects to break, as if hit. A &amp;quot;Body&amp;quot; is a physics-related helper object, to which a force or an impulse can be applied. Entities can consist of several bodies, interconnected in various ways (you can create/examine bodies in the model editor).&lt;br /&gt;
&lt;br /&gt;
''asName ''- the object to push; for bodies, use this format: &amp;quot;''entityName''_''bodyName''&amp;quot; &amp;lt;br /&amp;gt;''afX ''- magnitude along the X-axis &amp;lt;br /&amp;gt;''afY ''- magnitude along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- magnitude along the Z-axis &amp;lt;br /&amp;gt;''asCoordSystem ''- determines which coordinate system is used, usually &amp;quot;world&amp;quot; All of these functions are ''additive''  - when called consecutively, for each call, the vectors defined by (afX, afY, afZ) will be added together, and a resultant force/impulse will be calculated ''before''  any physics simulation is applied to the target object.&lt;br /&gt;
&lt;br /&gt;
====Connections====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithRope(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connects a prop with the movement of a rope (ie. turn wheel to move rope).&lt;br /&gt;
&lt;br /&gt;
''asName ''- connection name &amp;lt;br /&amp;gt;''asPropName ''- name of prop &amp;lt;br /&amp;gt;''asRopeName ''- name of rope &amp;lt;br /&amp;gt;''abInteractOnly ''- ? &amp;lt;br /&amp;gt;''afSpeedMul ''- speed multiplier of how quickly the rope moves &amp;lt;br /&amp;gt;''afToMinSpeed ''- the slowest the rope will move when moving the prop &amp;lt;br /&amp;gt;''afToMaxSpeed ''- the fastest the rope will move when moving the prop &amp;lt;br /&amp;gt;''abInvert ''- whether to invert the direction the rope moves &amp;lt;br /&amp;gt;''alStatesUsed ''- which states of the prop can interact with the rope?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithMoveObject(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This one should only be used if there must be an exact correspondance to prope &amp;quot;amount&amp;quot; and the moveobject open amount. It is best used for Wheel-door connections!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ConnectEntities(string&amp;amp; asName, string&amp;amp; asMainEntity, string&amp;amp; asConnectEntity, bool abInvertStateSent, int alStatesUsed, string&amp;amp; asCallbackFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asConnectionName, string &amp;amp;in asMainEntity, string &amp;amp;in asConnectEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;State is what is sent to connection entity and will be inverted if abInvertStateSent = true!&lt;br /&gt;
&lt;br /&gt;
====Lamps====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLampLit(string&amp;amp; asName, bool abLit, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Un)lits a lamp.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Name of the lamp &amp;lt;br /&amp;gt;''abLit ''- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit &amp;lt;br /&amp;gt;''abEffects ''- If you want to have the lamp fade in/out when it gets (un)lit&lt;br /&gt;
&lt;br /&gt;
====Doors====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorLocked(string&amp;amp; asName, bool abLocked, bool abEffects);&lt;br /&gt;
void SetSwingDoorClosed(string&amp;amp; asName, bool abClosed, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks/closes a swing door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
bool GetSwingDoorLocked(string&amp;amp; asName);&lt;br /&gt;
bool GetSwingDoorClosed(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a swing door is locked/closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorDisableAutoClose(string&amp;amp; asName, bool abDisableAutoClose);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deactivates the &amp;quot;auto-close&amp;quot; when a door is nearly closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetSwingDoorState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns an integer depending on how far the door is opened. &amp;lt;br /&amp;gt;-1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLocked(string&amp;amp; asName, bool abLocked);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks a level door. Note that level doors are NOT swing doors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedSound(string&amp;amp; asName, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which sound is played when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedText(string&amp;amp; asName, string&amp;amp; asTextCat, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectState(string&amp;amp; asName, float afState);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectStateExt(string&amp;amp; asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state, extended method.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween are valid too! &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed &amp;lt;br /&amp;gt;''afSlowdownDist ''- Distance to the target state before decceleration occurs. &amp;lt;br /&amp;gt;''abResetSpeed ''- Set to True if the prop's speed should be reset before performing the movement, else the prop will accelerate from it's current speed to afMaxSpeed.&lt;br /&gt;
&lt;br /&gt;
====Levers, wheels and buttons====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropObjectStuckState(string&amp;amp; asName, int alState);&lt;br /&gt;
void SetWheelStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
void SetLeverStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a prop&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;wheel&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;lever stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''alState ''- 0 = not stuck, 1 = at max, -1 = at min &amp;lt;br /&amp;gt;''abEffects ''- use effects&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelAngle(string&amp;amp; asName, float afAngle, bool abAutoMove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves a wheel to a certain angle.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAngle ''- angle &amp;lt;br /&amp;gt;''abAutoMove ''- determines whether the wheel should move on its own&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
void SetLeverInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to make a wheel/lever unstuck when interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetLeverState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the state of the lever. &amp;lt;br /&amp;gt;0 = not stuck, 1 = at max, -1 = at min&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderStuckState(string&amp;amp; asName, int alStuckState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a MultiSlider stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when state changes. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetButtonSwitchedOn(string&amp;amp; asName, bool abSwitchedOn, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sticky areas====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetAllowStickyAreaAttachment(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows entites to stick to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asProp);&lt;br /&gt;
void AttachBodyToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asBody);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop/body to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void DetachFromStickyArea(string&amp;amp; asAreaName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches everything from a StickyArea.&lt;br /&gt;
&lt;br /&gt;
====Enemies====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCAwake(string&amp;amp; asName, bool abAwake, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates the npc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCFollowPlayer(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets an NPC's head to follow the player's movement's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables an enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyIsHallucination(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void FadeEnemyToSmoke(string&amp;amp; asName, bool abPlaySound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly fades an enemy to smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ShowEnemyPlayerPosition(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the enemy run to the player, no matter where he is.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AlertEnemyOfPlayerPresence(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gives the specified enemy the player's current position and makes it search the area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisableTriggers(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables or disables enemy triggers. If disabled, enemy will not react to player or attack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddEnemyPatrolNode(string&amp;amp; asName, string&amp;amp; asNodeName, float afWaitTime, string&amp;amp; asAnimation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a patrol node to the enemy's path.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- path node &amp;lt;br /&amp;gt;''afWaitTime ''- time in seconds that the enemy waits at the path node before continuing &amp;lt;br /&amp;gt;''asAnimation ''- the animation the enemy uses when reaching the path node&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ClearEnemyPatrolNodes(string&amp;amp; asEnemyName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the current path of patrol nodes of the enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemySanityDecreaseActive(string &amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether an enemy activates the player's sanity drain when stared at.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX ''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToNode(string &amp;amp;in asEnemyName, string &amp;amp;in asNodeName, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific PathNode.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- Internal name of the node to teleport to &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToEntity(string &amp;amp;in asEnemyName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBody, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific entity.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asTargetEntity ''- Internal name of the entity to teleport to &amp;lt;br /&amp;gt;''asTargetBody''- Internal name of the entity's body name to teleport to. If empty, the first body will be used (might be unstable, recommended to input a body anyway) &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeManPigPose(string&amp;amp;in asName, string&amp;amp;in asPoseType);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the pose a specified ManPig.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asPoseType''- Name of the ManPig pose to use. Can be &amp;quot;Biped&amp;quot; or &amp;quot;Quadruped&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigFadeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should fade the player's view in and out.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigSoundDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should play the proximity sounds.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigEasyEscapeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should be easier to escape from when hunted.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ForceTeslaPigSighting(string&amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Forces a TeslaPig to be visible for a short time.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; GetEnemyStateName(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the name of the state a specified enemy is current in. States can be Hunt, Search, Patrol, Wait, Alert, Investigate, Track and BreakDoor.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;/div&gt;</summary>
		<author><name>Krutzelpuntz</name></author>
		
	</entry>
</feed>