User Tools

Site Tools


hpl2:amnesia:script_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:amnesia:script_functions [2014/09/20 12:54]
mudbill old revision restored (2014/09/09 14:55) * Edited to hopefully counter recurring issue.
hpl2:amnesia:script_functions [2020/03/10 22:48] (current)
mudbill Started formatting things a bit more consistently.
Line 1: Line 1:
 ===== Engine scripts ===== ===== Engine scripts =====
  
-**Notice**: Some of the functions below require the Amnesia 1.3 patch to be installed (currently in beta)It can be found [[http://goo.gl/6GQp4I|here]].+**Notice**: Some of the functions below require the Amnesia 1.3 update. Steam copies should ​be automatically updatedOther copies ​can go [[http://www.frictionalgames.com/forum/​thread-24334.html|here]].
  
 ==== Main ==== ==== Main ====
Line 7: Line 7:
 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. 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.
  
-<code c++>void OnStart(){ }+<code c++> 
 +void OnStart();
 </​code>​ </​code>​
  
 The function that runs when the map is loaded for the first time. The function that runs when the map is loaded for the first time.
  
-<code c++>void OnEnter(){ }+<code c++> 
 +void OnEnter();
 </​code>​ </​code>​
  
 The function that runs whenever the player enters a map. The function that runs whenever the player enters a map.
  
-<code c++>void OnLeave(){ }+<code c++> 
 +void OnLeave();
 </​code>​ </​code>​
  
 The function that runs when the player leaves a map. The function that runs when the player leaves a map.
  
-<code c++>void OnGameStart(){ }+<code c++> 
 +void OnGameStart();
 </​code>​ </​code>​
  
Line 29: Line 33:
 ==== General ==== ==== General ====
  
-<code c++>​float RandFloat(float afMin, float afMax);+<code c++> 
 +float RandFloat(float afMin, float afMax);
 </​code>​ </​code>​
  
 Generates a random float. Generates a random float.
  
-//afMin //- minimum value\\ +  - //afMin //- minimum value 
-//afMax //- maximum value +  ​- ​//afMax //- maximum value 
-<code c++>int RandInt(int alMin, int alMax);+<code c++> 
 +int RandInt(int alMin, int alMax);
 </​code>​ </​code>​
  
-Generates a random int. Note: the maximum value is //​inclusive//​ - the RandInt() function may return this value.+Generates a random int. Note: the maximum value is //​inclusive// ​ - the RandInt() function may return this value.
  
-//alMin //- minimum value\\ +  - //alMin //- minimum value 
-//alMax //- maximum value+  ​- ​//alMax //- maximum value
 <code c++> <code c++>
 bool StringContains(string&​ asString, string& asSubString);​ bool StringContains(string&​ asString, string& asSubString);​
 </​code>​ </​code>​
  
-Checks whether a string contains the specified string.\\ +Checks whether a string contains the specified string. \\ Example: searching for "​hello"​ in "hello world" would return **true**.
-Example: searching for "​hello"​ in "hello world" would return **true**.+
  
-//asString //- the string to check\\ +  - //asString //- the string to check 
-//​asSubString //- the string to search for+  ​- ​//​asSubString //- the string to search for
 <code c++> <code c++>
 string& StringSub(string&​ asString, int alStart, int alCount); string& StringSub(string&​ asString, int alStart, int alCount);
 </​code>​ </​code>​
  
-Returns the substring in a string.\\ +Returns the substring in a string. \\ Example: in the string "​frictional games rocks",​ using 4 as //​alStart// ​ and 6 as //​alCount// ​ would return **"​tional"​**.
-Example: in the string "​frictional games rocks",​ using 4 as //alStart// and 6 as //alCount// would return **"​tional"​**.+
  
-//asString //- the string\\ +  - //asString //- the string 
-//alStart //- start position in the string\\ +  ​- ​//alStart //- start position in the string 
-//alCount //- amount of characters +  ​- ​//alCount //- amount of characters 
-<code c++>int StringToInt(string&​in asString);+<code c++> 
 +int StringToInt(string&​in asString);
 </​code>​ </​code>​
  
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-If possible, returns ​a string converted to an integer ​value, else returns 0.+If possible, returns an integer ​converted from a string, else returns 0.
  
-//​asString//​ - String to convert. +  - //​asString// ​ - String to convert. 
-<code c++>​float StringToFloat(string&​in asString);+<code c++> 
 +float StringToFloat(string&​in asString);
 </​code>​ </​code>​
  
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-If possible, returns a string ​converted ​to float value, else returns 0.+If possible, returns a float converted ​from string, else returns 0.
  
-//​asString//​ - String to convert.+  - //​asString// ​ - String to convert.
 <code c++> <code c++>
 bool StringToBool(string&​in asString); bool StringToBool(string&​in asString);
Line 84: Line 90:
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-If possible, returns a string ​converted ​to boolean value, else returns false.+If possible, returns a boolean ​converted ​from string, else returns false.
  
-//​asString//​ - String to convert.+  - //​asString// ​ - String to convert.
 ==== Mathematical Operations ==== ==== Mathematical Operations ====
  
-<code c++>​float MathSin(float afX);+<code c++> 
 +float MathSin(float afX);
 </​code>​ </​code>​
  
Line 96: Line 103:
 Returns the sine of the specified value. Returns the sine of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathCos(float afX);+<code c++> 
 +float MathCos(float afX);
 </​code>​ </​code>​
  
Line 104: Line 112:
 Returns the cosine of the specified value. Returns the cosine of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathTan(float afX);+<code c++> 
 +float MathTan(float afX);
 </​code>​ </​code>​
  
Line 112: Line 121:
 Returns the tangent of the specified value. Returns the tangent of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathAsin(float afX);+<code c++> 
 +float MathAsin(float afX);
 </​code>​ </​code>​
  
Line 120: Line 130:
 Returns the arc sine of the specified value. Returns the arc sine of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathAcos(float afX);+<code c++> 
 +float MathAcos(float afX);
 </​code>​ </​code>​
  
Line 128: Line 139:
 Returns the arc cosine of the specified value. Returns the arc cosine of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathAtan(float afX);+<code c++> 
 +float MathAtan(float afX);
 </​code>​ </​code>​
  
Line 136: Line 148:
 Returns the arc tangent of the specified value. Returns the arc tangent of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathAtan2(float afX, float afY);+<code c++> 
 +float MathAtan2(float afX, float afY);
 </​code>​ </​code>​
  
Line 144: Line 157:
 Calculates and returns the arc tangent of the specified values. Calculates and returns the arc tangent of the specified values.
  
-//afX// - First value to operate.\\ +  - //​afX// ​ - First value to operate. 
-//afY// - Second value to operate. +  ​- ​//​afY// ​ - Second value to operate. 
-<code c++>​float MathSqrt(float afX);+<code c++> 
 +float MathSqrt(float afX);
 </​code>​ </​code>​
  
Line 153: Line 167:
 Returns the square root of the specified value. Returns the square root of the specified value.
  
-//afX// - Value to operate. +  - //​afX// ​ - Value to operate. 
-<code c++>​float MathPow(float afBase, float afExp);+<code c++> 
 +float MathPow(float afBase, float afExp);
 </​code>​ </​code>​
  
Line 161: Line 176:
 Returns the value of afBase raised to the power of afExp. Returns the value of afBase raised to the power of afExp.
  
-//afBase// - The base value.\\ +  - //​afBase// ​ - The base value. 
-//afExp// - Value to calculate the base with. +  ​- ​//​afExp// ​ - Value to calculate the base with. 
-<code c++>​float MathMin(float afA, float afB);+<code c++> 
 +float MathMin(float afA, float afB);
 </​code>​ </​code>​
  
Line 170: Line 186:
 Returns the lowest value. Returns the lowest value.
  
-//afA// - First value.\\ +  - //​afA// ​ - First value. 
-//afB// - Second value. +  ​- ​//​afB// ​ - Second value. 
-<code c++>​float MathMax(float afA, float afB);+<code c++> 
 +float MathMax(float afA, float afB);
 </​code>​ </​code>​
  
Line 179: Line 196:
 Returns the highest value. Returns the highest value.
  
-//afA// - First value.\\ +  - //​afA// ​ - First value. 
-//afB// - Second value. +  ​- ​//​afB// ​ - Second value. 
-<code c++>​float MathClamp(float afX, float afMin, float afMax);+<code c++> 
 +float MathClamp(float afX, float afMin, float afMax);
 </​code>​ </​code>​
  
Line 188: Line 206:
 Returns afX clamped between afMin and afMax. If afX < afMin, returns afMin, and if afX > afMax, returns afMax. Returns afX clamped between afMin and afMax. If afX < afMin, returns afMin, and if afX > afMax, returns afMax.
  
-//afX// - The value to clamp.\\ +  - //​afX// ​ - The value to clamp. 
-//afMin// - The minimum value to clamp afX with.\\ +  ​- ​//​afMin// ​ - The minimum value to clamp afX with. 
-//afMax// - The maximum value to clamp afX with. +  ​- ​//​afMax// ​ - The maximum value to clamp afX with. 
-<code c++>​float MathAbs(float afX);+<code c++> 
 +float MathAbs(float afX);
 </​code>​ </​code>​
  
Line 198: Line 217:
 Returns the absolute value. Returns the absolute value.
  
-//afX// - Value to operate.+  - //​afX// ​ - Value to operate.
 ==== Debugging ==== ==== Debugging ====
  
-<code c++>void Print (string&​ asString);+<code c++> 
 +void Print (string&​ asString);
 </​code>​ </​code>​
  
-Prints a string to the log.+Prints a string to the log file (''​hpl.log''​).
  
-<code c++>void AddDebugMessage(string&​ asString, bool abCheckForDuplicates);​+<code c++> 
 +void AddDebugMessage(string&​ asString, bool abCheckForDuplicates);​
 </​code>​ </​code>​
  
 Prints a string to the debug console. Prints a string to the debug console.
  
-//asString //- the string to print \\ +  - //asString //- the string to print 
-//​abCheckForDuplicates //- if true, the string won't be printed more than once on screen until it disappears +  ​- ​//​abCheckForDuplicates //- if true, the string won't be printed more than once on screen until it disappears 
-<code c++>void ProgLog(string&​ asLevel, string& asMessage);+<code c++> 
 +void ProgLog(string&​ asLevel, string& asMessage);
 </​code>​ </​code>​
  
-?+Prints an entry to the ProgLog (progression log). \\ 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. \\  \\ This function allows to log custom messages.The messages in the ProgLog file are sorted by time elapsed since a map was loaded. 
 + 
 +ProgLog has to be enabled for a player profile in ''​user_settings.cfg'' ​ before it starts working.
  
-//asLevel //- can be "​Low",​ "​Medium"​ or "​High"​\\ +  - //asLevel //- can be "​Low",​ "​Medium"​ or "​High"​. It's a tag which appears in each log entry, for event prioritising. 
-//asMessage //- ?+  ​- ​//asMessage //- The custom message to be printed to the log.
 <code c++> <code c++>
 bool ScriptDebugOn();​ bool ScriptDebugOn();​
 </​code>​ </​code>​
  
-Checks whether the debug mode is enabled.\\ +Checks whether the debug mode is enabled. \\ See [[:​hpl2:​amnesia:​devenvguide|Setting up Development Environment]] to setup debug mode on your own computer.
-See [[:​hpl2:​amnesia:​devenvguide|Setting up Development Environment]] to setup debug mode on your own computer.+
  
 ==== Variables ==== ==== Variables ====
Line 233: Line 256:
 Local variables can be used throughout the same script file. Local variables can be used throughout the same script file.
  
-<code c++>void SetLocalVarInt(string&​ asName, int alVal);+<code c++> 
 +void SetLocalVarInt(string&​ asName, int alVal);
 void AddLocalVarInt(string&​ asName, int alVal); void AddLocalVarInt(string&​ asName, int alVal);
 int GetLocalVarInt(string&​ asName); int GetLocalVarInt(string&​ asName);
 </​code>​ </​code>​
- +<code c++> 
-<code c++>void SetLocalVarFloat(string&​ asName, float afVal);+void SetLocalVarFloat(string&​ asName, float afVal);
 void AddLocalVarFloat(string&​ asName, float afVal); void AddLocalVarFloat(string&​ asName, float afVal);
 float GetLocalVarFloat(string&​ asName); float GetLocalVarFloat(string&​ asName);
 </​code>​ </​code>​
- +<code c++> 
-<code c++>void SetLocalVarString(string&​ asName, const string& asVal);+void SetLocalVarString(string&​ asName, const string& asVal);
 void AddLocalVarString(string&​ asName, string& asVal); void AddLocalVarString(string&​ asName, string& asVal);
 string& GetLocalVarString(string&​ asName); string& GetLocalVarString(string&​ asName);
Line 252: Line 276:
 Global variables can be used throughout several maps and can be accessed by several script files. Global variables can be used throughout several maps and can be accessed by several script files.
  
-<code c++>void SetGlobalVarInt(string&​ asName, int alVal);+<code c++> 
 +void SetGlobalVarInt(string&​ asName, int alVal);
 void AddGlobalVarInt(string&​ asName, int alVal); void AddGlobalVarInt(string&​ asName, int alVal);
 int GetGlobalVarInt(string&​ asName); int GetGlobalVarInt(string&​ asName);
 </​code>​ </​code>​
- +<code c++> 
-<code c++>void SetGlobalVarFloat(string&​ asName, float afVal);+void SetGlobalVarFloat(string&​ asName, float afVal);
 void AddGlobalVarFloat(string&​ asName, float afVal); void AddGlobalVarFloat(string&​ asName, float afVal);
 float GetGlobalVarFloat(string&​ asName); float GetGlobalVarFloat(string&​ asName);
 </​code>​ </​code>​
- +<code c++> 
-<code c++>void SetGlobalVarString(string&​ asName, const string& asVal);+void SetGlobalVarString(string&​ asName, const string& asVal);
 void AddGlobalVarString(string&​ asName, string& asVal); void AddGlobalVarString(string&​ asName, string& asVal);
 string& GetGlobalVarString(string&​ asName); string& GetGlobalVarString(string&​ asName);
Line 269: Line 294:
 ==== Particle Systems ==== ==== Particle Systems ====
  
-<code c++>void PreloadParticleSystem(string&​ asPSFile);+<code c++> 
 +void PreloadParticleSystem(string&​ asPSFile);
 </​code>​ </​code>​
  
-Preloads a particle system. ​Extension: .ps+Preloads a particle system.
  
-<code c++>void CreateParticleSystemAtEntity(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS);+  - //​asPSFile// ​ - The particle system file to load. Extension: .ps 
 +<code c++> 
 +void CreateParticleSystemAtEntity(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS);
 </​code>​ </​code>​
  
 Creates a particle system on an entity. Creates a particle system on an entity.
  
-//asPSName //- internal name\\ +  - //asPSName //- internal name 
-//asPSFile //- the particle system to use + extension .ps\\ +  ​- ​//asPSFile //- the particle system to use + extension .ps 
-//asEntity //- the entity to create the particle system at\\ +  ​- ​//asEntity //- the entity to create the particle system at 
-//abSavePS //- determines whether a particle system should "​remember"​ its shown/​hidden state, so that this state can be restored when the player revisits the level +  ​- ​//abSavePS //- determines whether a particle system should "​remember"​ its shown/​hidden state, so that this state can be restored when the player revisits the level 
-<code c++>void CreateParticleSystemAtEntityExt(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS,+<code c++> 
 +void CreateParticleSystemAtEntityExt(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS,
 float afR, float afG, float afB, float afA, bool abFadeAtDistance,​ float afFadeMinEnd,​ float afFadeMinStart,​ float afR, float afG, float afB, float afA, bool abFadeAtDistance,​ float afFadeMinEnd,​ float afFadeMinStart,​
 float afFadeMaxStart,​ float afFadeMaxEnd);​ float afFadeMaxStart,​ float afFadeMaxEnd);​
Line 290: Line 319:
 Creates a particle system on an entity, extended method with more options. Creates a particle system on an entity, extended method with more options.
  
-//asPSName //- internal name\\ +  - //asPSName //- internal name 
-//asPSFile //- the particle system to use + extension .ps\\ +  ​- ​//asPSFile //- the particle system to use + extension .ps 
-//asEntity //- the entity to create the particle system at\\ +  ​- ​//asEntity //- the entity to create the particle system at 
-//abSavePS //- determines whether a particle system should "​remember"​ its shown/​hidden state, so that this state can be restored when the player revisits the level\\ +  ​- ​//abSavePS //- determines whether a particle system should "​remember"​ its shown/​hidden state, so that this state can be restored when the player revisits the level 
-//afR //- red value\\ +  ​- ​//afR //- red value 
-//afG //- green value\\ +  ​- ​//afG //- green value 
-//afB //- blue value\\ +  ​- ​//afB //- blue value 
-//afA //- alpha value\\ +  ​- ​//afA //- alpha value 
-//​abFadeAtDistance //- determines whether a particle system fades from a certain distance on\\ +  ​- ​//​abFadeAtDistance //- determines whether a particle system fades from a certain distance on 
-//​afFadeMinEnd //- minimum distance at which the particle system stops fading\\ +  ​- ​//​afFadeMinEnd //- minimum distance at which the particle system stops fading 
-//​afFadeMinStart //- minimum distance at which the particle system starts fading\\ +  ​- ​//​afFadeMinStart //- minimum distance at which the particle system starts fading 
-//​afFadeMaxStart //- maximum distance at which the particle system starts fading\\ +  ​- ​//​afFadeMaxStart //- maximum distance at which the particle system starts fading 
-//​afFadeMaxEnd //- maximum distance at which the particle system stops fading +  ​- ​//​afFadeMaxEnd //- maximum distance at which the particle system stops fading 
-<code c++>void DestroyParticleSystem(string&​ asName);+<code c++> 
 +void DestroyParticleSystem(string&​ asName);
 </​code>​ </​code>​
  
 Destroys a particle system. Destroys a particle system.
  
 +  - //​asName// ​ - The internal name of the particle system
 ==== Sounds & Music ==== ==== Sounds & Music ====
  
-<code c++>void PreloadSound(string&​ asSoundFile);​+<code c++> 
 +void PreloadSound(string&​ asSoundFile);​
 </​code>​ </​code>​
  
-Preloads a sound. ​Extension: .snt+Preloads a sound.
  
-<code c++>void PlaySoundAtEntity(string&​ asSoundName,​ string& asSoundFile,​ string& asEntity, float afFadeTime, bool abSaveSound);​+  - //​asSoundFile// ​ - The sound file to load. Extension: .snt 
 +<code c++> 
 +void PlaySoundAtEntity(string&​ asSoundName,​ string& asSoundFile,​ string& asEntity, float afFadeTime, bool abSaveSound);​
 </​code>​ </​code>​
  
 Creates a sound on an entity. Creates a sound on an entity.
  
-//​asSoundName //- internal name\\ +  - //​asSoundName //- internal name 
-//​asSoundFile //- the sound to use + extension .snt\\ +  ​- ​//​asSoundFile //- the sound to use + extension .snt 
-//asEntity //- the entity to create the sound at, can be "​Player"​\\ +  ​- ​//asEntity //- the entity to create the sound at, can be "​Player"​ 
-//​afFadeTime //- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f\\ +  ​- ​//​afFadeTime //- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f 
-//​abSaveSound //- if ''​true'',​ a looping sound will "​remember"​ 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//! +  ​- ​//​abSaveSound //- if ''​true'',​ a looping sound will "​remember"​ 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//! 
-<code c++>void FadeInSound(string&​ asSoundName,​ float afFadeTime, bool abPlayStart);​+<code c++> 
 +void FadeInSound(string&​ asSoundName,​ float afFadeTime, bool abPlayStart);​
 </​code>​ </​code>​
  
 Fades in a sound. Fades in a sound.
  
-//​asSoundName //- internal name\\ +  - //​asSoundName //- internal name 
-//​afFadeTime //- time in seconds\\ +  ​- ​//​afFadeTime //- time in seconds 
-//​abPlayStart //- ? +  ​- ​//​abPlayStart //- ? 
-<code c++>void StopSound(string&​ asSoundName,​ float afFadeTime);​+<code c++> 
 +void StopSound(string&​ asSoundName,​ float afFadeTime);​
 </​code>​ </​code>​
  
 Fades out a sound. Fades out a sound.
  
-//​asSoundName //- internal name\\ +  - //​asSoundName //- internal name 
-//​afFadeTime //- time in seconds, use 0 to immediatly stop the sound +  ​- ​//​afFadeTime //- time in seconds, use 0 to immediatly stop the sound 
-<code c++>void PlayMusic(string&​ asMusicFile,​ bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);+<code c++> 
 +void PlayMusic(string&​ asMusicFile,​ bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
 </​code>​ </​code>​
  
 Plays music. Plays music.
  
-//​asMusicFile //- the music to play + extension .ogg\\ +  - //​asMusicFile //- the music to play + extension .ogg 
-//abLoop //- determines whether a music track should loop\\ +  ​- ​//abLoop //- determines whether a music track should loop 
-//afVolume //- volume of the music\\ +  ​- ​//afVolume //- volume of the music 
-//​afFadeTime //- time in seconds until music reaches full volume\\ +  ​- ​//​afFadeTime //- time in seconds until music reaches full volume 
-//alPrio //- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.\\ +  ​- ​//alPrio //- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc. 
-//​abResume//​ - if ''​true'',​ playback will be continued from where the track stopped after the call to StopMusic(); ​ if ''​false'',​ the track will be restarted. +  ​- ​//​abResume// ​ - if ''​true'',​ playback will be continued from where the track stopped after the call to StopMusic();​ if ''​false'',​ the track will be restarted. 
-<code c++>void StopMusic(float afFadeTime, int alPrio);+<code c++> 
 +void StopMusic(float afFadeTime, int alPrio);
 </​code>​ </​code>​
  
 Stops music. Stops music.
  
-//​afFadeTime //- time in seconds until music stops\\ +  - //​afFadeTime //- time in seconds until music stops 
-//alPrio //- the priority of the music that should stop +  ​- ​//alPrio //- the priority of the music that should stop 
-<code c++>void FadeGlobalSoundVolume(float afDestVolume,​ float afTime);+<code c++> 
 +void FadeGlobalSoundVolume(float afDestVolume,​ float afTime);
 </​code>​ </​code>​
  
-Influences the global sound volume, that means everything you can hear.+Influences the global sound volume, that means everything you can hear **from the world**. This does not affect music of GUI sounds.
  
-//​afDestVolume //- desired volume\\ +  - //​afDestVolume //- desired volume 
-//afTime //- time in seconds until volume reaches desired volume +  ​- ​//afTime //- time in seconds until volume reaches desired volume 
-<code c++>void FadeGlobalSoundSpeed(float afDestSpeed,​ float afTime);+<code c++> 
 +void FadeGlobalSoundSpeed(float afDestSpeed,​ float afTime);
 </​code>​ </​code>​
  
 Influences the global sound speed. Influences the global sound speed.
  
-//​afDestSpeed //- desired speed\\ +  - //​afDestSpeed //- desired speed 
-//afTime //- time in seconds until volume reaches desired speed+  ​- ​//afTime //- time in seconds until volume reaches desired speed
 ==== Lights ==== ==== Lights ====
  
-<code c++>void SetLightVisible(string&​ asLightName,​ bool abVisible);+<code c++> 
 +void SetLightVisible(string&​ asLightName,​ bool abVisible);
 </​code>​ </​code>​
  
 Enables/​disables lights. Enables/​disables lights.
  
-//​asLightName //- internal name\\ +  - //​asLightName //- internal name 
-//abVisible //- determines the state of the light +  ​- ​//abVisible //- determines the state of the light 
-<code c++>void FadeLightTo(string&​ asLightName,​ float afR, float afG, float afB, float afA, float afRadius, float afTime);+<code c++> 
 +void FadeLightTo(string&​ asLightName,​ float afR, float afG, float afB, float afA, float afRadius, float afTime);
 </​code>​ </​code>​
  
 Changes the properties of a light. Changes the properties of a light.
  
-//​asLightName //- internal name\\ +  - //​asLightName //- internal name 
-//afR //- red value\\ +  ​- ​//afR //- red value 
-//afG //- green value\\ +  ​- ​//afG //- green value 
-//afB //- blue value\\ +  ​- ​//afB //- blue value 
-//afA //- alpha value\\ +  ​- ​//afA //- alpha value 
-//afRadius //- radius of the light. -1 means keeping the radius\\ +  ​- ​//afRadius //- radius of the light. -1 means keeping the radius 
-//afTime //- time in seconds until change is done +  ​- ​//afTime //- time in seconds until change is done 
-<code c++>void SetLightFlickerActive(string&​ asLightName,​ bool abActive);+<code c++> 
 +void SetLightFlickerActive(string&​ asLightName,​ bool abActive);
 </​code>​ </​code>​
  
 Activates flickering on a light. Activates flickering on a light.
  
 +  - //​asLightName// ​ - The internal light name
 +  - //​abActive// ​ - true = active, false = inactive
 ===== Game scripts ===== ===== Game scripts =====
  
 ==== General ==== ==== General ====
  
-<code c++>void StartCredits(string&​ asMusic, bool abLoopMusic,​ string& asTextCat, string& asTextEntry,​ int alEndNum);+<code c++> 
 +void StartCredits(string&​ asMusic, bool abLoopMusic,​ string& asTextCat, string& asTextEntry,​ int alEndNum);
 </​code>​ </​code>​
  
 Starts the end credits screen. Starts the end credits screen.
  
-//asMusic //- the music to play (including .ogg)\\ +  - //asMusic //- the music to play (including .ogg) 
-//​abLoopMusic //- determines whether the music should loop\\ +  ​- ​//​abLoopMusic //- determines whether the music should loop 
-//asTextCat //- the category to be used in the .lang file\\ +  ​- ​//asTextCat //- the category to be used in the .lang file 
-//​asTextEntry //- the entry in the .lang file\\ +  ​- ​//​asTextEntry //- the entry in the .lang file 
-//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. +  ​- ​//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. 
-<code c++>void StartDemoEnd();​+<code c++> 
 +void StartDemoEnd();​
 </​code>​ </​code>​
  
 Starts the end images that are used in the demo, images are named "​demo_end01.jpg",​ increase the number for each image you want to use. (NEEDS VERIFICATION) Starts the end images that are used in the demo, images are named "​demo_end01.jpg",​ increase the number for each image you want to use. (NEEDS VERIFICATION)
  
-<code c++>void AutoSave();+<code c++> 
 +void AutoSave();
 </​code>​ </​code>​
  
 Save the game to the auto save. Save the game to the auto save.
  
-<code c++>void CheckPoint (string&​ asName, string& asStartPos, string& asCallback, string& asDeathHintCat,​ string& asDeathHintEntry);​+<code c++> 
 +void CheckPoint (string&​ asName, string& asStartPos, string& asCallback, string& asDeathHintCat,​ string& asDeathHintEntry);​
 </​code>​ </​code>​
  
-Sets a checkpoint at which the player will respawn in case he dies.\\ +Sets a checkpoint at which the player will respawn in case he dies. \\ Callback syntax: ​''​void MyFunc(string &in asName, int alCount)''  ​\\ Count is 0 on the first checkpoint load!
-Callback syntax: ​**void MyFunc(string &in asName, int alCount)** \\ +
-Count is 0 on the first checkpoint load!+
  
-//asName //- the internal name\\ +  - //asName //- the internal name 
-//​asStartPos //- the name of the StartPos in the editor\\ +  ​- ​//​asStartPos //- the name of the StartPos in the editor 
-//​asCallback //- the function to call when the player dies/​respawns\\ +  ​- ​//​asCallback //- the function to call when the player dies/​respawns 
-//​asDeathHintCat //- the category of the death hint message to be used in the .lang file\\ +  ​- ​//​asDeathHintCat //- the category of the death hint message to be used in the .lang file 
-//​asDeathHintEntry //- the entry in the .lang file +  ​- ​//​asDeathHintEntry //- the entry in the .lang file 
-<code c++>void ChangeMap(string&​ asMapName, string& asStartPos, string& asStartSound,​ string& asEndSound);​+<code c++> 
 +void ChangeMap(string&​ asMapName, string& asStartPos, string& asStartSound,​ string& asEndSound);​
 </​code>​ </​code>​
  
 Immediatly loads another map. Immediatly loads another map.
  
-//asMapName //- the file to load\\ +  - //asMapName //- the file to load 
-//​asStartPos //- the name of the StartPos on the next map\\ +  ​- ​//​asStartPos //- the name of the StartPos on the next map 
-//​asStartSound //- the sound that is played when the change starts\\ +  ​- ​//​asStartSound //- the sound that is played when the change starts 
-//​asEndSound //- the sound that is played when the new map is loaded +  ​- ​//​asEndSound //- the sound that is played when the new map is loaded 
-<code c++>void ClearSavedMaps();​+<code c++> 
 +void ClearSavedMaps();​
 </​code>​ </​code>​
  
 Clears the "​history"​ 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. Clears the "​history"​ 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.
  
-<code c++>void CreateDataCache();​+<code c++> 
 +void CreateDataCache();​
 void DestroyDataCache();​ void DestroyDataCache();​
 </​code>​ </​code>​
Line 454: Line 504:
 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. 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.
  
-<code c++>void SetMapDisplayNameEntry(string&​ asNameEntry);​+<code c++> 
 +void SetMapDisplayNameEntry(string&​ asNameEntry);​
 </​code>​ </​code>​
  
 Sets the map name shown in save file names. If none is set NULL is assumed. Sets the map name shown in save file names. If none is set NULL is assumed.
  
-//​asNameEntry //- the entry to display, category must be "​Levels"​! +  - //​asNameEntry //- the entry to display, category must be "​Levels"​! 
-<code c++>void SetSkyBoxActive(bool abActive);+<code c++> 
 +void SetSkyBoxActive(bool abActive);
 </​code>​ </​code>​
  
-Enables<​nowiki>​\<​/nowiki>Disables the skybox. +Enables/​Disables the skybox. 
-<code c++>void SetSkyBoxTexture(string&​ asTexture);+ 
 +  - //​abActive// ​ - true = active, false = inactive 
 +<code c++> 
 +void SetSkyBoxTexture(string&​ asTexture);
 </​code>​ </​code>​
  
 Sets the texture of the skybox. Sets the texture of the skybox.
  
-<code c++>void SetSkyBoxColor(float afR, float afG, float afB, float afA);+  - //​asTexture// ​ - The texture file to set. Extension: .dds 
 +<code c++> 
 +void SetSkyBoxColor(float afR, float afG, float afB, float afA);
 </​code>​ </​code>​
  
-//afR //- red value\\ +Sets the solid color of the skybox rather than a texture. 
-//afG //- green value\\ + 
-//afB //- blue value\\ +  - //afR //- red value 
-//afA //- alpha value +  ​- ​//afG //- green value 
-<code c++>void SetFogActive(bool abActive);+  ​- ​//afB //- blue value 
 +  ​- ​//afA //- alpha value 
 +<code c++> 
 +void SetFogActive(bool abActive);
 </​code>​ </​code>​
  
-Enables<​nowiki>​\<​/nowiki>Disables the global fog. +Enables/​Disables the global fog. 
-<code c++>void SetFogColor(float afR, float afG, float afB, float afA);+ 
 +  - //​abActive// ​ - true = active, false = inactive 
 +<code c++> 
 +void SetFogColor(float afR, float afG, float afB, float afA);
 </​code>​ </​code>​
  
-//afR //- red value\\ +Sets the color to use for the global fog. 
-//afG //- green value\\ + 
-//afB //- blue value\\ +  - //afR //- red value 
-//afA //- alpha value +  ​- ​//afG //- green value 
-<code c++>void SetFogProperties(float afStart, float afEnd, float afFalloffExp,​ bool abCulling);+  ​- ​//afB //- blue value 
 +  ​- ​//afA //- alpha value 
 +<code c++> 
 +void SetFogProperties(float afStart, float afEnd, float afFalloffExp,​ bool abCulling);
 </​code>​ </​code>​
  
-//afStart //- how many meters from the camera should the fog begin\\ +Sets the properties for the global fog. 
-//afEnd //- how many meters from the camera should the fog reach full thickness\\ + 
-//​afFalloffExp //- the amount by which the thinkness increases\\ +  - //afStart //- how many meters from the camera should the fog begin 
-//abCulling //- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded +  ​- ​//afEnd //- how many meters from the camera should the fog reach full thickness 
-<code c++>void SetupLoadScreen(string&​asTextCat,​ string&​asTextEntry,​ int alRandomNum,​ string&​asImageFile);​+  ​- ​//​afFalloffExp //- the amount by which the thinkness increases 
 +  ​- ​//abCulling //- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded 
 +<code c++> 
 +void SetupLoadScreen(string&​asTextCat,​ string&​asTextEntry,​ int alRandomNum,​ string&​asImageFile);​
 </​code>​ </​code>​
  
 Determines which loading screen will be shown when changing maps. Determines which loading screen will be shown when changing maps.
  
-//asTextCat //- the category of the loading text in the .lang file to be shown on the loading screen\\ +  - //asTextCat //- the category of the loading text in the .lang file to be shown on the loading screen 
-//​asTextEntry //- the entry in the .lang file\\ +  ​- ​//​asTextEntry //- the entry in the .lang file 
-//​alRandomNum //- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If < =1 then no suffix is added\\ +  ​- ​//​alRandomNum //- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If < =1 then no suffix is added 
-//​asImageFile //- the image to be shown (optional)+  ​- ​//​asImageFile //- the image to be shown (optional)
 ==== Game Timer ==== ==== Game Timer ====
  
-<code c++>void AddTimer(string&​ asName, float afTime, string& asFunction);​+<code c++> 
 +void AddTimer(string&​ asName, float afTime, string& asFunction);​
 </​code>​ </​code>​
  
-Creates a timer which calls a function when it expires.\\ +Creates a timer which calls a function when it expires. \\ Callback syntax: ​''​void MyFunc(string &in asTimer)''​
-Callback syntax: ​**void MyFunc(string &in asTimer)**+
  
-//asName //- the name of the timer\\ +  - //asName //- the name of the timer 
-//afTime //- time in seconds\\ +  ​- ​//afTime //- time in seconds 
-//​asFunction //- the function to call +  ​- ​//​asFunction //- the function to call 
-<code c++>void RemoveTimer(string&​ asName);+<code c++> 
 +void RemoveTimer(string&​ asName);
 </​code>​ </​code>​
  
 Removes a timer, no matter how much time is left. Removes a timer, no matter how much time is left.
  
-<code c++>​float GetTimerTimeLeft(string&​ asName);+  - //​asName// ​ - the internal name of the timer. 
 +<code c++> 
 +float GetTimerTimeLeft(string&​ asName);
 </​code>​ </​code>​
  
 Returns the time left on a timer. Returns the time left on a timer.
  
 +  - //​asName// ​ - the internal name of the timer.
 ==== Screen Effects ==== ==== Screen Effects ====
  
-<code c++>void FadeOut(float afTime);+<code c++> 
 +void FadeOut(float afTime);
 </​code>​ </​code>​
  
Line 532: Line 606:
  
 //afTime //- time in seconds until the screen is completly black //afTime //- time in seconds until the screen is completly black
-<code c++>void FadeIn(float afTime);+ 
 +<code c++> 
 +void FadeIn(float afTime);
 </​code>​ </​code>​
  
Line 538: Line 614:
  
 //afTime //- time in seconds until the screen back to normal //afTime //- time in seconds until the screen back to normal
-<code c++>void FadeImageTrailTo(float afAmount, float afSpeed);+ 
 +<code c++> 
 +void FadeImageTrailTo(float afAmount, float afSpeed);
 </​code>​ </​code>​
  
 Applies the image trail effect to the screen. Applies the image trail effect to the screen.
  
-//afAmount //- intensity (default: 0)\\ +//afAmount //- intensity (default: 0) \\ //afSpeed //- time in seconds until full effect 
-//afSpeed //- time in seconds until full effect + 
-<code c++>void FadeSepiaColorTo(float afAmount, float afSpeed);+<code c++> 
 +void FadeSepiaColorTo(float afAmount, float afSpeed);
 </​code>​ </​code>​
  
 Makes the screen go dark red. Makes the screen go dark red.
  
-//afAmount //- intensity (default: 0)\\ +//afAmount //- intensity (default: 0) \\ //afSpeed //- time in seconds until full effect 
-//afSpeed //- time in seconds until full effect + 
-<code c++>void FadeRadialBlurTo(float afSize, float afSpeed);+<code c++> 
 +void FadeRadialBlurTo(float afSize, float afSpeed);
 </​code>​ </​code>​
  
 Applies radial blur effects to the screen. Applies radial blur effects to the screen.
  
-//afSize //- intensity (default: 0)\\ +//afSize //- intensity (default: 0) \\ //afSpeed //- time in seconds until full effect 
-//afSpeed //- time in seconds until full effect + 
-<code c++>void SetRadialBlurStartDist(float afStartDist);​+<code c++> 
 +void SetRadialBlurStartDist(float afStartDist);​
 </​code>​ </​code>​
  
Line 565: Line 646:
  
 //​afStartDist //- the distance at which the effect starts //​afStartDist //- the distance at which the effect starts
-<code c++>void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);+ 
 +<code c++> 
 +void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);
 </​code>​ </​code>​
  
 Fades the screen to white. Fades the screen to white.
  
-//afFadeIn //- time in seconds until screen is white\\ +//afFadeIn //- time in seconds until screen is white \\ //afWhite //- determines to which percentage the screen fades to white (1.0 = completly white) \\ //afFadeOut //- time in seconds until screen is back to normal again 
-//afWhite //- determines to which percentage the screen fades to white (1.0 = completly white)\\ + 
-//afFadeOut //- time in seconds until screen is back to normal again +<code c++> 
-<code c++>void StartEffectEmotionFlash(string&​ asTextCat, string& asTextEntry,​ string& asSound);+void StartEffectEmotionFlash(string&​ asTextCat, string& asTextEntry,​ string& asSound);
 </​code>​ </​code>​
  
 Fades the screen to white and shows a text message. Fades the screen to white and shows a text message.
  
-//asTextCat //- the category in the .lang file\\ +//asTextCat //- the category in the .lang file \\ //​asTextEntry //- the text entry in the .lang file \\ //asSound //- the sound to play while fading 
-//​asTextEntry //- the text entry in the .lang file\\ + 
-//asSound //- the sound to play while fading +<code c++> 
-<code c++>void AddEffectVoice(string&​ asVoiceFile,​ string& asEffectFile,​ string& asTextCat, string& asTextEntry,​+void AddEffectVoice(string&​ asVoiceFile,​ string& asEffectFile,​ string& asTextCat, string& asTextEntry,​
 bool abUsePosition,​ string& asPosEntity,​ float afMinDistance,​ float afMaxDistance);​ bool abUsePosition,​ string& asPosEntity,​ float afMinDistance,​ float afMaxDistance);​
 </​code>​ </​code>​
Line 587: Line 670:
 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. 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.
  
-//​asVoiceFile //- the voice to play\\ +//​asVoiceFile //- the voice to play \\ //​asEffectFile //- the effect to play \\ //asTextCat //- the category in the .lang file \\ //​asTextEntry //- the text entry in the .lang file \\ //​abUsePosition //- plays using 3D from the entity, or without 3D \\ //​asPosEntity //- the entity at which the effect appears \\ //​afMinDistance //- minimum distance to see the effect \\ //​afMaxDistance //- maximum distance to see the effect 
-//​asEffectFile //- the effect to play\\ + 
-//asTextCat //- the category in the .lang file\\ +<code c++> 
-//​asTextEntry //- the text entry in the .lang file\\ +void StopAllEffectVoices(float afFadeOutTime);​
-//​abUsePosition //- plays using 3D from the entity, or without 3D\\ +
-//​asPosEntity //- the entity at which the effect appears\\ +
-//​afMinDistance //- minimum distance to see the effect\\ +
-//​afMaxDistance //- maximum distance to see the effect +
-<code c++>void StopAllEffectVoices(float afFadeOutTime);​+
 </​code>​ </​code>​
  
Line 606: Line 684:
 Checks whether EffectVoices are still active. Checks whether EffectVoices are still active.
  
-<code c++>void SetEffectVoiceOverCallback(string&​ asFunc);+<code c++> 
 +void SetEffectVoiceOverCallback(string&​ asFunc);
 </​code>​ </​code>​
  
-Sets the function to be called when the EffectVoices are finished.\\ +Sets the function to be called when the EffectVoices are finished. \\ Callback syntax: **void MyFunc()** 
-Callback syntax: **void MyFunc()**+
 <code c++> <code c++>
 bool GetFlashbackIsActive();​ bool GetFlashbackIsActive();​
Line 617: Line 696:
 Checks whether a flashback is still in effect. Checks whether a flashback is still in effect.
  
-<code c++>void StartPlayerSpawnPS(string&​ asSPSFile);+<code c++> 
 +void StartPlayerSpawnPS(string&​ asSPSFile);
 void StopPlayerSpawnPS();​ void StopPlayerSpawnPS();​
 </​code>​ </​code>​
  
-Not sure what this doesbut it has something ​to do with particle ​systems.+Continuously spawn regular particle systems (''​.ps''​) around the player. Particles created by this script carry over from map to map. \\  \\ //​asSPSFile// ​ - the ''​.sps'' ​ file to use. Exemplary ''​.sps'' ​ files are located in the ''/​misc'' ​ folder in the main game directory. \\  \\ Custom ''​.sps'' ​ files can be created by hand in a text editor (see existing ones and mimic how those are written). \\ 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.
  
-<code c++>void PlayGuiSound(string&​ asSoundFile,​ float afVolume);+<code c++> 
 +void PlayGuiSound(string&​ asSoundFile,​ float afVolume);
 </​code>​ </​code>​
  
 Plays a sound, not using 3D. Plays a sound, not using 3D.
  
-//​asSoundFile //- the sound to play (extension is .snt)\\ +//​asSoundFile //- the sound to play (extension is .snt) \\ //afVolume //- the volume of the sound 
-//afVolume //- the volume of the sound + 
-<code c++>void StartScreenShake(float afAmount, float afTime, float afFadeInTime,​ float afFadeOutTime);​+<code c++> 
 +void StartScreenShake(float afAmount, float afTime, float afFadeInTime,​ float afFadeOutTime);​
 </​code>​ </​code>​
  
 Shakes the screen. Shakes the screen.
  
-//afAmount //- intensity of the shake\\ +//afAmount //- intensity of the shake \\ //afTime //- duration of the shake \\ //​afFadeInTime //- time in seconds until full intensity is reached \\ //​afFadeOutTime //- time until screen is back to normal 
-//afTime //- duration of the shake\\ + 
-//​afFadeInTime //- time in seconds until full intensity is reached\\ +<code c++> 
-//​afFadeOutTime //- time until screen is back to normal +void SetInDarknessEffectsActive(bool abX);
-<code c++>void SetInDarknessEffectsActive(bool abX);+
 </​code>​ </​code>​
  
Line 646: Line 727:
 Enables/​disables the sanity drain and night vision effects while in the darkness. Enables/​disables the sanity drain and night vision effects while in the darkness.
  
-//bool abX// - Enable/​disable effects.+//bool abX//  - Enable/​disable effects. 
 ==== Insanity ==== ==== Insanity ====
  
-<code c++>void SetInsanitySetEnabled(string&​ asSet, bool abX);+<code c++> 
 +void SetInsanitySetEnabled(string&​ asSet, bool abX);
 </​code>​ </​code>​
  
 Determines which InsanitySets are enabled. Determines which InsanitySets are enabled.
  
-//asSet //- the set\\ +//asSet //- the set \\ //abX //- enabled or not 
-//abX //- enabled or not + 
-<code c++>void StartInsanityEvent(string &in asEventName);​+<code c++> 
 +void StartInsanityEvent(string &in asEventName);​
 </​code>​ </​code>​
  
Line 664: Line 748:
  
 //​asEventName //- Insanity event to play. //​asEventName //- Insanity event to play.
-<code c++>void StartRandomInsanityEvent();​+ 
 +<code c++> 
 +void StartRandomInsanityEvent();​
 </​code>​ </​code>​
  
 Starts a random insanity event from the available sets. Starts a random insanity event from the available sets.
  
-<code c++>void StopCurrentInsanityEvent();​+<code c++> 
 +void StopCurrentInsanityEvent();​
 </​code>​ </​code>​
  
Line 677: Line 764:
  
 <code c++> <code c++>
-bool InsanityEventIsActive();​+void InsanityEventIsActive();​
 </​code>​ </​code>​
  
-Checks whether an insanity event is currently in effect.+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&​15x15}}
  
 ==== Player ==== ==== Player ====
Line 686: Line 773:
 Note that the player'​s maximum health and sanity is 100. Note that the player'​s maximum health and sanity is 100.
  
-<code c++>void SetPlayerActive(bool abActive);+<code c++> 
 +void SetPlayerActive(bool abActive);
 </​code>​ </​code>​
  
 Enabled/​Disable player controlled movement. Enabled/​Disable player controlled movement.
  
-<code c++>void ChangePlayerStateToNormal();​+<code c++> 
 +void ChangePlayerStateToNormal();​
 </​code>​ </​code>​
  
 Sets certain effects back to normal. It can for example make the player drop an item. Sets certain effects back to normal. It can for example make the player drop an item.
  
-<code c++>void SetPlayerCrouching(bool abCrouch);+<code c++> 
 +void SetPlayerCrouching(bool abCrouch);
 </​code>​ </​code>​
  
 Forces the player to crouch. Forces the player to crouch.
  
-<code c++>void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);​+<code c++> 
 +void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);​
 </​code>​ </​code>​
  
 Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects. Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.
  
-//afX //- amount along the X-axis\\ +//afX //- amount along the X-axis \\ //afY //- amount along the Y-axis \\ //afZ //- amount along the Z-axis \\ //​abUseLocalCoords //- If true, axes are based on where the player is facing, not the world. 
-//afY //- amount along the Y-axis\\ + 
-//afZ //- amount along the Z-axis\\ +<code c++> 
-//​abUseLocalCoords //- If true, axes are based on where the player is facing, not the world. +void ShowPlayerCrossHairIcons(bool abX);
-<code c++>void ShowPlayerCrossHairIcons(bool abX);+
 </​code>​ </​code>​
  
 Enables/​Disables the icons when a player has something in focus. Enables/​Disables the icons when a player has something in focus.
  
-<code c++>void SetPlayerSanity(float afSanity);+<code c++> 
 +void SetPlayerSanity(float afSanity);
 void AddPlayerSanity(float afSanity); void AddPlayerSanity(float afSanity);
 float GetPlayerSanity();​ float GetPlayerSanity();​
Line 722: Line 813:
 Modifies/​returns the sanity of the player. Modifies/​returns the sanity of the player.
  
-<code c++>void SetPlayerHealth(float afHealth);+<code c++> 
 +void SetPlayerHealth(float afHealth);
 void AddPlayerHealth(float afHealth); void AddPlayerHealth(float afHealth);
 float GetPlayerHealth();​ float GetPlayerHealth();​
Line 729: Line 821:
 Modifies/​returns the health of the player. Modifies/​returns the health of the player.
  
-<code c++>void SetPlayerLampOil(float afOil);+<code c++> 
 +void SetPlayerLampOil(float afOil);
 void AddPlayerLampOil(float afOil); void AddPlayerLampOil(float afOil);
 float GetPlayerLampOil();​ float GetPlayerLampOil();​
Line 736: Line 829:
 Modifies/​returns the lamp oil of the player. Modifies/​returns the lamp oil of the player.
  
-<code c++>​float GetPlayerSpeed();​+<code c++> 
 +float GetPlayerSpeed();​
 float GetPlayerYSpeed();​ float GetPlayerYSpeed();​
 </​code>​ </​code>​
Line 742: Line 836:
 Returns the current speed of the player. Returns the current speed of the player.
  
-<code c++>void SetSanityDrainDisabled(bool abX);+<code c++> 
 +void SetSanityDrainDisabled(bool abX);
 </​code>​ </​code>​
  
 Enables/​Disables sanity drain from darkness, monsters, etc. Enables/​Disables sanity drain from darkness, monsters, etc.
  
-<code c++>void GiveSanityBoost();​+<code c++> 
 +void GiveSanityBoost();​
 void GiveSanityBoostSmall();​ void GiveSanityBoostSmall();​
 </​code>​ </​code>​
Line 753: Line 849:
 Boosts the player'​s sanity by a fixed amount. Boosts the player'​s sanity by a fixed amount.
  
-<code c++>void GiveSanityDamage(float afAmount, bool abUseEffect);​+<code c++> 
 +void GiveSanityDamage(float afAmount, bool abUseEffect);​
 </​code>​ </​code>​
  
 Reduces the sanity of the player. Reduces the sanity of the player.
  
-//afAmount //- amount of sanity damage done\\ +//afAmount //- amount of sanity damage done \\ //​abUseEffect //- determines whether an effect is played when the sanity damage is dealt 
-//​abUseEffect //- determines whether an effect is played when the sanity damage is dealt + 
-<code c++>void GivePlayerDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal);+<code c++> 
 +void GivePlayerDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal);
 </​code>​ </​code>​
  
 Reduces the health of the player. Reduces the health of the player.
  
-//afAmount //- amount of damage done to health\\ +//afAmount //- amount of damage done to health \\ //asType //- plays a certain effect on the screen when the damage is dealt (BloodSplat,​ Claws or Slash) \\ //​abSpinHead //- changes the camera view when damage is dealt \\ //abLethal //- set to true if player can die from given damage 
-//asType //- plays a certain effect on the screen when the damage is dealt (BloodSplat,​ Claws or Slash)\\ + 
-//​abSpinHead //- changes the camera view when damage is dealt\\ +<code c++> 
-//abLethal //- set to true if player can die from given damage +void FadePlayerFOVMulTo(float afX, float afSpeed);
-<code c++>void FadePlayerFOVMulTo(float afX, float afSpeed);+
 </​code>​ </​code>​
  
 Changes the field of view of the player. A shorter FOV will create a zoom effect. Changes the field of view of the player. A shorter FOV will create a zoom effect.
  
-//afX //- multiplier of default FOV (1 is default)\\ +//afX //- multiplier of default FOV (1 is default) \\ //afSpeed //- the speed of change between FOV's 
-//afSpeed //- the speed of change between FOV'​s + 
-<code c++>void FadePlayerAspectMulTo(float afX, float afSpeed);+<code c++> 
 +void FadePlayerAspectMulTo(float afX, float afSpeed);
 </​code>​ </​code>​
  
 Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally. Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally.
  
-//afX //- multiplier of default aspect (default is 1)\\ +//afX //- multiplier of default aspect (default is 1) \\ //afSpeed //- the speed of change between FOV's 
-//afSpeed //- the speed of change between FOV'​s + 
-<code c++>void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);​+<code c++> 
 +void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);​
 </​code>​ </​code>​
  
 Rotates the position of the camera on the player'​s body. Rotates the position of the camera on the player'​s body.
  
-//afX //- angle of rotation of head, positive being counter-clockwise\\ +//afX //- angle of rotation of head, positive being counter-clockwise \\ //​afSpeedMul //- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow) \\ //​afMaxSpeed //- maximum speed of rotation 
-//​afSpeedMul //- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)\\ + 
-//​afMaxSpeed //- maximum speed of rotation +<code c++> 
-<code c++>void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);​+void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);​
 </​code>​ </​code>​
  
 Changes the position of the camera on the player'​s body. Changes the position of the camera on the player'​s body.
  
-//afX //- amount along the X-axis\\ +//afX //- amount along the X-axis \\ //afY //- amount along the Y-axis \\ //afZ //- amount along the Z-axis \\ //afSpeed //- speed at which the change happens \\ //​afSlowDownDist //- distance at which to start slowing down (prevents the head from abruptly stopping) 
-//afY //- amount along the Y-axis\\ + 
-//afZ //- amount along the Z-axis\\ +<code c++> 
-//afSpeed //- speed at which the change happens\\ +void StartPlayerLookAt(string&​ asEntityName,​ float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);​
-//​afSlowDownDist //- distance at which to start slowing down (prevents the head from abruptly stopping) +
-<code c++>void StartPlayerLookAt(string&​ asEntityName,​ float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);​+
 void StopPlayerLookAt();​ void StopPlayerLookAt();​
 </​code>​ </​code>​
Line 807: Line 904:
 Forces the player to look at a certain entity until StopPlayerLookAt is used. Forces the player to look at a certain entity until StopPlayerLookAt is used.
  
-//​asEntityName //- the entity to look at\\ +//​asEntityName //- the entity to look at \\ //​afSpeedMul //- how fast should the player look at the entity \\ //​afMaxSpeed //- maximum speed allowed \\ //​asAtTargetCallback //- function to call when player looks at target 
-//​afSpeedMul //- how fast should the player look at the entity\\ + 
-//​afMaxSpeed //- maximum speed allowed\\ +<code c++> 
-//​asAtTargetCallback //- function to call when player looks at target +void SetPlayerMoveSpeedMul(float afMul);
-<code c++>void SetPlayerMoveSpeedMul(float afMul);+
 void SetPlayerRunSpeedMul(float afMul); void SetPlayerRunSpeedMul(float afMul);
 void SetPlayerLookSpeedMul(float afMul); void SetPlayerLookSpeedMul(float afMul);
Line 818: Line 914:
 Changes the player'​s move/​run/​look speed. Default is 1. Changes the player'​s move/​run/​look speed. Default is 1.
  
-<code c++>void SetPlayerJumpForceMul(float afMul);+<code c++> 
 +void SetPlayerJumpForceMul(float afMul);
 </​code>​ </​code>​
  
Line 825: Line 922:
 Changes the player'​s jump multiplier. Higher values = higher jumps. Default is 1. Changes the player'​s jump multiplier. Higher values = higher jumps. Default is 1.
  
-<code c++>void SetPlayerJumpDisabled(bool abX);+<code c++> 
 +void SetPlayerJumpDisabled(bool abX);
 void SetPlayerCrouchDisabled(bool abX); void SetPlayerCrouchDisabled(bool abX);
 </​code>​ </​code>​
Line 831: Line 929:
 Enables/​Disables the player'​s ability to jump/​crouch. Enables/​Disables the player'​s ability to jump/​crouch.
  
-<code c++>void TeleportPlayer(string&​ asStartPosName);​+<code c++> 
 +void TeleportPlayer(string&​ asStartPosName);​
 </​code>​ </​code>​
  
 Instantly teleports the player to the target StartPos. Instantly teleports the player to the target StartPos.
  
-<code c++>void SetLanternActive(bool abX, bool abUseEffects);​+<code c++> 
 +void SetLanternActive(bool abX, bool abUseEffects);​
 </​code>​ </​code>​
  
Line 847: Line 947:
 Checks whether the player currently uses his lantern. Checks whether the player currently uses his lantern.
  
-<code c++>void SetLanternDisabled(bool abX);+<code c++> 
 +void SetLanternDisabled(bool abX);
 </​code>​ </​code>​
  
 Enables/​Disables the player'​s ability to use his lantern. Enables/​Disables the player'​s ability to use his lantern.
  
-<code c++>void SetLanternLitCallback(string&​ asCallback);​+<code c++> 
 +void SetLanternLitCallback(string&​ asCallback);​
 </​code>​ </​code>​
  
-Sets the function to call when the player uses his lantern.\\ +Sets the function to call when the player uses his lantern. \\ Callback syntax: **MyFunc(bool abLit)** 
-Callback syntax: **MyFunc(bool abLit)** + 
-<code c++>void SetMessage(string&​ asTextCategory,​ string& asTextEntry,​ float afTime);+<code c++> 
 +void SetMessage(string&​ asTextCategory,​ string& asTextEntry,​ float afTime);
 </​code>​ </​code>​
  
 Displays a message on the screen. Displays a message on the screen.
  
-//​asTextCategory //- the category in the .lang file\\ +//​asTextCategory //- the category in the .lang file \\ //​asTextEntry //- the entry in the .lang file \\ //afTime //- determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length. 
-//​asTextEntry //- the entry in the .lang file\\ + 
-//afTime //- determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length. +<code c++> 
-<code c++>void SetDeathHint(string&​ asTextCategory,​ string& asTextEntry);​+void SetDeathHint(string&​ asTextCategory,​ string& asTextEntry);​
 </​code>​ </​code>​
  
 Sets the message that appears when the player dies. Sets the message that appears when the player dies.
  
-//​asTextCategory //- the category in the .lang file\\ +//​asTextCategory //- the category in the .lang file \\ //​asTextEntry //- the entry in the .lang file 
-//​asTextEntry //- the entry in the .lang file + 
-<code c++>void DisableDeathStartSound();​+<code c++> 
 +void DisableDeathStartSound();​
 </​code>​ </​code>​
  
Line 883: Line 987:
 "​REQUIRES THE 1.2 PATCH: JUSTINE"​ Moves the player forward. It needs to be called in a timer that updates 60 times / second. "​REQUIRES THE 1.2 PATCH: JUSTINE"​ Moves the player forward. It needs to be called in a timer that updates 60 times / second.
  
-<code c++>void SetPlayerFallDamageDisabled(bool abX);+<code c++> 
 +void SetPlayerFallDamageDisabled(bool abX);
 </​code>​ </​code>​
  
Line 890: Line 995:
 Enables/​disables the player'​s ability to take fall damage. Enables/​disables the player'​s ability to take fall damage.
  
-<code c++>void SetPlayerPos(float afX, float afY, float afZ);+<code c++> 
 +void SetPlayerPos(float afX, float afY, float afZ);
 </​code>​ </​code>​
  
Line 897: Line 1003:
 Sets the player'​s position within the level. Sets the player'​s position within the level.
  
-//afX// - X co-ordinate position.\\ +//​afX// ​ - X co-ordinate position. \\ //​afY// ​ - Y co-ordinate position. \\ //​afZ// ​ - Z co-ordinate position. 
-//afY// - Y co-ordinate position.\\ + 
-//afZ// - Z co-ordinate position. +<code c++> 
-<code c++>​float GetPlayerPosX();​+float GetPlayerPosX();​
 float GetPlayerPosY();​ float GetPlayerPosY();​
 float GetPlayerPosZ();​ float GetPlayerPosZ();​
Line 911: Line 1017:
 ==== Journal ==== ==== Journal ====
  
-<code c++>void AddNote(string&​ asNameAndTextEntry,​ string& asImage);+<code c++> 
 +void AddNote(string&​ asNameAndTextEntry,​ string& asImage);
 </​code>​ </​code>​
  
 Adds a note to the player'​s journal. Adds a note to the player'​s journal.
  
-//​asNameAndTextEntry //- entries in the .lang file. Must end with _Name and _Text and be in category "​Journal"​!\\ +//​asNameAndTextEntry //- entries in the .lang file. Must end with _Name and _Text and be in category "​Journal"​! \\ //asImage //- the background image to be used 
-//asImage //- the background image to be used + 
-<code c++>void AddDiary(string&​ asNameAndTextEntry,​ string& asImage);+<code c++> 
 +void AddDiary(string&​ asNameAndTextEntry,​ string& asImage);
 </​code>​ </​code>​
  
 Adds a diary to the player'​s journal. Adds a diary to the player'​s journal.
  
-//​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 "​Journal"​!\\ +//​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 "​Journal"​! \\ //asImage //- the background image to be used 
-//asImage //- the background image to be used + 
-<code c++>void ReturnOpenJournal(bool abOpenJournal);​+<code c++> 
 +void ReturnOpenJournal(bool abOpenJournal);​
 </​code>​ </​code>​
  
Line 932: Line 1041:
 ==== Quests ==== ==== Quests ====
  
-<code c++>void AddQuest(string&​ asName, string& asNameAndTextEntry);​+<code c++> 
 +void AddQuest(string&​ asName, string& asNameAndTextEntry);​
 </​code>​ </​code>​
  
 Adds a quest to the player'​s journal. Adds a quest to the player'​s journal.
  
-//asName //- the internal name to be used\\ +//asName //- the internal name to be used \\ //​asNameAndTextEntry //- entry in the .lang file. Must start with "​Quest_<​texthere>​_Text”,​ and be in category “Journal”! 
-//​asNameAndTextEntry //- entry in the .lang file. Must start with "​Quest_<​texthere>​_Text”,​ and be in category “Journal”! + 
-<code c++>void CompleteQuest(string&​ asName, string& asNameAndTextEntry);​+<code c++> 
 +void CompleteQuest(string&​ asName, string& asNameAndTextEntry);​
 </​code>​ </​code>​
  
 Completes a quest. Completes a quest.
  
-//asName //- the internal name of the quest\\ +//asName //- the internal name of the quest \\ //​asNameAndTextEntry //- entry in the .lang file. Must start with " Quest_<​texthere>​_Text ”, and be in category “Journal”! 
-//​asNameAndTextEntry //- entry in the .lang file. Must start with " Quest_<​texthere>​_Text ”, and be in category “Journal”!+
 <code c++> <code c++>
 bool QuestIsCompleted(string&​ asName); bool QuestIsCompleted(string&​ asName);
Line 953: Line 1064:
 Checks whether a quest is completed/​added. Checks whether a quest is completed/​added.
  
-<code c++>void SetNumberOfQuestsInMap(int alNumberOfQuests);​+<code c++> 
 +void SetNumberOfQuestsInMap(int alNumberOfQuests);​
 </​code>​ </​code>​
  
-?+Sets the number of quests in the map.
  
-<code c++>void GiveHint (string&​ asName, string& asMessageCat,​ string& asMessageEntry,​ float afTimeShown);​+//​alNumberOfQuests //- Amount of Quests 
 + 
 +<code c++> 
 +void GiveHint (string&​ asName, string& asMessageCat,​ string& asMessageEntry,​ float afTimeShown);​
 </​code>​ </​code>​
  
 Displays a hint on the player'​s screen. Displays a hint on the player'​s screen.
  
-//asName //- the internal name\\ +//asName //- the internal name \\ //​asMessageCat //- the category in the .lang file \\ //​asMessageEntry //- the entry in the .lang file \\ //​afTimeShown //- time in seconds until the message disappears. If time is <= 0 then the life time is calculated based on string length. 
-//​asMessageCat //- the category in the .lang file\\ + 
-//​asMessageEntry //- the entry in the .lang file\\ +<code c++> 
-//​afTimeShown //- time in seconds until the message disappears. If time is <= 0 then the life time is calculated based on string length. +void RemoveHint (string&​ asName);
-<code c++>void RemoveHint (string&​ asName);+
 void BlockHint (string&​ asName); void BlockHint (string&​ asName);
 void UnBlockHint (string&​ asName); void UnBlockHint (string&​ asName);
Line 973: Line 1087:
  
 Removes<​nowiki>​\</​nowiki>​Blocks<​nowiki>​\</​nowiki>​Unblocks a hint. Removes<​nowiki>​\</​nowiki>​Blocks<​nowiki>​\</​nowiki>​Unblocks a hint.
 +
 ==== Inventory ==== ==== Inventory ====
  
-<code c++>void ExitInventory();​+<code c++> 
 +void ExitInventory();​
 </​code>​ </​code>​
  
 Exits the inventory by force. Exits the inventory by force.
  
-<code c++>void SetInventoryDisabled(bool abX);+<code c++> 
 +void SetInventoryDisabled(bool abX);
 </​code>​ </​code>​
  
 Disables the player'​s ability to open his inventory. Disables the player'​s ability to open his inventory.
  
-<code c++>void SetInventoryMessage(string&​ asTextCategory,​ string& asTextEntry,​ float afTime);+<code c++> 
 +void SetInventoryMessage(string&​ asTextCategory,​ string& asTextEntry,​ float afTime);
 </​code>​ </​code>​
  
 Adds a message at the bottom of the inventory screen. Adds a message at the bottom of the inventory screen.
  
-//​asTextCategory //- the category in the .lang file\\ +//​asTextCategory //- the category in the .lang file \\ //​asTextEntry //- the entry in the .lang file \\ //afTime //- time in seconds until the message disappears. If life time is <= 0 then the life time is calculated based on string length. 
-//​asTextEntry //- the entry in the .lang file\\ + 
-//afTime //- time in seconds until the message disappears. If life time is <= 0 then the life time is calculated based on string length. +<code c++> 
-<code c++>void GiveItem(string&​ asName, string& asType, string& asSubTypeName,​ string& asImageName,​ float afAmount);+void GiveItem(string&​ asName, string& asType, string& asSubTypeName,​ string& asImageName,​ float afAmount);
 </​code>​ </​code>​
  
 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. 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.
  
-//asName //- internal name\\ +//asName //- internal name \\ //asType //- item to give \\ //​asSubTypeName //- item name for .lang file \\ //​asImageName //- For exemple: void GiveItem(string&​ asName, string& asType, "​chemical_container_full",​ <font 12pt:​normal/​auto;;​rgb(255,​0,​0);;​inherit>​“chemical_container_full.tga”</​font> ​   , float afAmount); The image is from <//​nowiki>// ​ <//​nowiki>// ​ <//​nowiki><​nowiki>​\</​nowiki>// ​ <///​nowiki>// ​ <///​nowiki>// ​ <///​nowiki>// ​ graphics<​nowiki>​\</​nowiki>​Item<​nowiki>​\</​nowiki>​chemical_container_full.tga : is the image which will appear in Inventory - [[http://​img155.imageshack.us/​img155/​6871/​20806785.jpg|img155.imageshack.us/​img155/​6871/​20806785.jpg]]
-//asType //- item to give\\ +
-//​asSubTypeName //- item name for .lang file\\ +
-//​asImageName //- For exemple: void GiveItem(string&​ asName, string& asType, "​chemical_container_full",​ <font 12pt:​normal/​auto;;​rgb(255,​0,​0);;​inherit>​“chemical_container_full.tga”</​font>​ , float afAmount); ​ The image is from <//​nowiki>//​ <//​nowiki>//​ <//​nowiki><​nowiki>​\</​nowiki>//​ <///​nowiki>//​ <///​nowiki>//​ <///​nowiki>//​ graphics<​nowiki>​\</​nowiki>​Item<​nowiki>​\</​nowiki>​chemical_container_full.tga : is the image which will appear in Inventory - [[http://​img155.imageshack.us/​img155/​6871/​20806785.jpg|img155.imageshack.us/​img155/​6871/​20806785.jpg]]+
  
 //afAmount //- amount to give //afAmount //- amount to give
-<code c++>void RemoveItem(string&​ asName);+ 
 +<code c++> 
 +void RemoveItem(string&​ asName);
 </​code>​ </​code>​
  
Line 1015: Line 1132:
 Checks whether the player has an item in his inventory. Checks whether the player has an item in his inventory.
  
-<code c++>void GiveItemFromFile(string&​ asName, string& asFileName);​+<code c++> 
 +void GiveItemFromFile(string&​ asName, string& asFileName);​
 </​code>​ </​code>​
  
 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. 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.
  
-//asName //- internal name\\ +//asName //- internal name \\ //​asFileName //- item to give + extension (.ent) 
-//​asFileName //- item to give + extension (.ent) + 
-<code c++>void AddCombineCallback(string&​ asName, string& asItemA, string& asItemB, string& asFunction, bool abAutoRemove);​+<code c++> 
 +void AddCombineCallback(string&​ asName, string& asItemA, string& asItemB, string& asFunction, bool abAutoRemove);​
 </​code>​ </​code>​
  
-Allows the player to combine items in his inventory.\\ +Allows the player to combine items in his inventory. \\ Callback syntax: **void MyFunc(string &in asItemA, string &in asItemB)**
-Callback syntax: **void MyFunc(string &in asItemA, string &in asItemB)**+
  
-//asName //- internal name for the callback\\ +//asName //- internal name for the callback \\ //asItemA //- internal name of first item \\ //asItemB //- internal name of second item \\ //​asFunction //- the function to call \\ //​abAutoRemove //- determines whether the callback should be removed when the items are combined 
-//asItemA //- internal name of first item\\ + 
-//asItemB //- internal name of second item\\ +<code c++> 
-//​asFunction //- the function to call\\ +void RemoveCombineCallback(string&​ asName);
-//​abAutoRemove //- determines whether the callback should be removed when the items are combined +
-<code c++>void RemoveCombineCallback(string&​ asName);+
 </​code>​ </​code>​
  
-Removes a combine callback.\\ +Removes a combine callback. \\ //​asName// ​ - the internal name of the callback to be removed (as specified in AddCombineCallback) 
-//asName// - the internal name of the callback to be removed (as specified in AddCombineCallback) + 
-<code c++>void AddUseItemCallback(string&​ asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);​+<code c++> 
 +void AddUseItemCallback(string&​ asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);​
 </​code>​ </​code>​
  
-Allows the player to use items on the world.\\ +Allows the player to use items on the world. \\ Callback syntax: **void MyFunc(string &in asItem, string &in asEntity)**
-Callback syntax: **void MyFunc(string &in asItem, string &in asEntity)**+
  
-//asName //- internal name\\ +//asName //- internal name \\ //asItem //- internal name of the item \\ //asEntity //- entity to be able to use the item on \\ //​asFunction //- function to call \\ //​abAutoDestroy //- determines whether the item is destroyed when used 
-//asItem //- internal name of the item\\ + 
-//asEntity //- entity to be able to use the item on\\ +<code c++> 
-//​asFunction //- function to call\\ +void RemoveUseItemCallback(string&​ asName);
-//​abAutoDestroy //- determines whether the item is destroyed when used +
-<code c++>void RemoveUseItemCallback(string&​ asName);+
 </​code>​ </​code>​
  
Line 1058: Line 1172:
 === General === === General ===
  
-<code c>void SetEntityActive(string&​ asName, bool abActive);+<code c> 
 +void SetEntityActive(string&​ asName, bool abActive);
 </​code>​ </​code>​
  
 Activates/​deactivates an entity. Activates/​deactivates an entity.
  
-<code c>void SetEntityVisible(string &in asName, bool abVisible);+<code c> 
 +void SetEntityVisible(string &in asName, bool abVisible);
 </​code>​ </​code>​
  
Line 1070: Line 1186:
 Activates/​deactivates an entity'​s visual mesh. The collision body remains. Activates/​deactivates an entity'​s visual mesh. The collision body remains.
  
-//asName// - Name of the entity.\\ +//​asName// ​ - Name of the entity. \\ //​abActive// ​ - Activate/​deactivate mesh. 
-//​abActive//​ - Activate/​deactivate mesh.+
 <code c> <code c>
 bool GetEntityExists(string&​ asName); bool GetEntityExists(string&​ asName);
Line 1078: Line 1194:
 Checks whether an entity exists. Checks whether an entity exists.
  
-<code c>void SetEntityCustomFocusCrossHair(string&​ asName, string& asCrossHair);​+<code c> 
 +void SetEntityCustomFocusCrossHair(string&​ asName, string& asCrossHair);​
 </​code>​ </​code>​
  
 Changes the crosshair that is used when focusing an entity. Changes the crosshair that is used when focusing an entity.
  
-//asName //- internal name\\ +//asName //- internal name \\ //​asCrossHair //- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder 
-//​asCrossHair //- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder + 
-<code c>void CreateEntityAtArea(string&​ asEntityName,​ string& asEntityFile,​ string& asAreaName, bool abFullGameSave);​+<code c> 
 +void CreateEntityAtArea(string&​ asEntityName,​ string& asEntityFile,​ string& asAreaName, bool abFullGameSave);​
 </​code>​ </​code>​
  
 Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition). Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition).
  
-//​asEntityName //- internal name\\ +//​asEntityName //- internal name \\ //​asEntityFile //- entity to be used extension .ent \\ //​asAreaName //- the area to create the entity at \\ //​abFullGameSave //- determines whether an entity "​remembers"​ its state 
-//​asEntityFile //- entity to be used   ​extension .ent\\ + 
-//​asAreaName //- the area to create the entity at\\ +<code c> 
-//​abFullGameSave //- determines whether an entity "​remembers"​ its state +void ReplaceEntity(string &in asName, string &in asBodyName, string &in asNewEntityName,​ string &in asNewEntityFile,​ bool abFullGameSave);​
-<code c>void ReplaceEntity(string &in asName, string &in asBodyName, string &in asNewEntityName,​ string &in asNewEntityFile,​ bool abFullGameSave);​+
 </​code>​ </​code>​
  
Line 1101: Line 1218:
 Removes an entity and places a new one in its place. Removes an entity and places a new one in its place.
  
-//asName// - Name of the entity to replace.\\ +//​asName// ​ - Name of the entity to replace. \\ //​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). \\ //​asNewEntityName// ​ - Name of the new entity. \\ //​asNewEntityFile// ​ - Name of the new entity file. Extension .ent. \\ //​abFullGameSave// ​ - Whether ALL properties of this entity should be saved throughout levels. 
-//​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).\\ + 
-//​asNewEntityName//​ - Name of the new entity.\\ +<code c++> 
-//​asNewEntityFile//​ - Name of the new entity file. Extension .ent.\\ +void PlaceEntityAtEntity(string &in asName, string &in asTargetEntity,​ string &in asTargetBodyName,​ bool abUseRotation);​ 
-//​abFullGameSave//​ - Whether ALL properties of this entity should be saved throughout levels. +</​code>​
-<code c++>void PlaceEntityAtEntity(string &in asName, string &in asTargetEntity,​ string &in asTargetBodyName,​ bool abUseRotation);</​code>​+
  
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead. ​ +Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead.
  
-//asName// - Name of the entity to place.\\ +//​asName// ​ - Name of the entity to place. \\ //​asTargetEntity// ​ - Name of the other entity to place the first entity at. \\ //​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). \\ //​abUseRotation// ​ - Whether the entity should be rotated like the target entity. 
-//​asTargetEntity//​ - Name of the other entity to place the first entity at.\\ + 
-//​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).\\ +<code c> 
-//​abUseRotation//​ - Whether the entity should be rotated like the target entity. +void SetEntityPos(string &in asName, float afX, float afY, float afZ);
-<code c>void SetEntityPos(string &in asName, float afX, float afY, float afZ);+
 </​code>​ </​code>​
  
Line 1123: Line 1238:
 Moves an entity to a position in the level. Moves an entity to a position in the level.
  
-//asName// - Name of the entity to move.\\ +//​asName// ​ - Name of the entity to move. \\ //​afX// ​ - X co-ordinate position. \\ //​afY// ​ - Y co-ordinate position. \\ //​afZ// ​ - Z co-ordinate position. 
-//afX// - X co-ordinate position.\\ + 
-//afY// - Y co-ordinate position.\\ +<code c> 
-//afZ// - Z co-ordinate position. +float GetEntityPosX(string &in asName);
-<code c>float GetEntityPosX(string &in asName);+
 float GetEntityPosY(string &in asName); float GetEntityPosY(string &in asName);
 float GetEntityPosZ(string &in asName); float GetEntityPosZ(string &in asName);
Line 1136: Line 1250:
 Returns an entity'​s position in the level on the specified axis. Returns an entity'​s position in the level on the specified axis.
  
-//asName// - Name of the entity. +//​asName// ​ - Name of the entity. 
-<code c>void SetEntityPlayerLookAtCallback(string&​ asName, string& asCallback, bool abRemoveWhenLookedAt);​+ 
 +<code c> 
 +void SetEntityPlayerLookAtCallback(string&​ asName, string& asCallback, bool abRemoveWhenLookedAt);​
 </​code>​ </​code>​
  
-Calls a function when the player looks at a certain entity.\\ +Calls a function when the player looks at a certain entity. \\ Callback syntax: **void MyFunc(string &in asEntity, int alState)** ​ \\ alState: 1 = looking, -1 = not looking
-Callback syntax: **void MyFunc(string &in asEntity, int alState)** \\ +
-alState: 1 = looking, -1 = not looking+
  
-//asName //- internal name\\ +//asName //- internal name \\ //​asCallback //- function to call \\ //​abRemoveWhenLookedAt //- determines whether the callback should be removed when the player looked at the entity 
-//​asCallback //- function to call\\ + 
-//​abRemoveWhenLookedAt //- determines whether the callback should be removed when the player looked at the entity +<code c> 
-<code c>void SetEntityPlayerInteractCallback(string&​ asName, string& asCallback, bool abRemoveOnInteraction);​+void SetEntityPlayerInteractCallback(string&​ asName, string& asCallback, bool abRemoveOnInteraction);​
 </​code>​ </​code>​
  
-Calls a function when the player interacts with a certain entity.\\ +Calls a function when the player interacts with a certain entity. \\ Callback syntax: **void MyFunc(string &in asEntity)**
-Callback syntax: **void MyFunc(string &in asEntity)**+
  
-//asName //- internal name\\ +//asName //- internal name \\ //​asCallback //- function to call \\ //​abRemoveOnInteraction //- determines whether the callback should be removed when the player interacts with the entity 
-//​asCallback //- function to call\\ + 
-//​abRemoveOnInteraction //- determines whether the callback should be removed when the player interacts with the entity +<code c> 
-<code c>void SetEntityCallbackFunc(string&​ asName, string& asCallback);​+void SetEntityCallbackFunc(string&​ asName, string& asCallback);​
 </​code>​ </​code>​
  
-Calls a function when the player interacts with a certain entity.\\ +Calls a function when the player interacts with a certain entity. \\ Callback syntax: **void MyFunc(string &in asEntity, string &in type)** ​ \\ Type depends on entity type and includes: "​OnPickup",​ "​Break",​ "​OnIgnite",​ etc
-Callback syntax: **void MyFunc(string &in asEntity, string &in type)** \\ +
-Type depends on entity type and includes: "​OnPickup",​ "​Break",​ "​OnIgnite",​ etc+
  
-<code c>void SetEntityConnectionStateChangeCallback(string&​ asName, string& asCallback);​+<code c> 
 +void SetEntityConnectionStateChangeCallback(string&​ asName, string& asCallback);​
 </​code>​ </​code>​
  
-A callback called when ever the connection state changes (button being switched on, lever switched, etc).\\ +A callback called when ever the connection state changes (button being switched on, lever switched, etc). \\ Callback syntax: **void Func(string &in asEntity, int alState)** ​ \\ alState: -1 = off, 0 = between, 1 = on
-Callback syntax: **void Func(string &in asEntity, int alState)** \\ +
-alState: -1 = off, 0 = between, 1 = on+
  
-<code c>void SetEntityInteractionDisabled(string&​ asName, bool abDisabled);​+<code c> 
 +void SetEntityInteractionDisabled(string&​ asName, bool abDisabled);​
 </​code>​ </​code>​
  
 Disallows interaction with an entity. Disallows interaction with an entity.
  
-<code c>void BreakJoint (string&​ asName);+<code c> 
 +void BreakJoint (string&​ asName);
 </​code>​ </​code>​
  
 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. 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.
  
-<code c>void AddEntityCollideCallback(string&​ asParentName,​ string& asChildName,​ string& asFunction, bool abDeleteOnCollide,​ int alStates);+<code c> 
 +void AddEntityCollideCallback(string&​ asParentName,​ string& asChildName,​ string& asFunction, bool abDeleteOnCollide,​ int alStates);
 </​code>​ </​code>​
  
-Calls a function when two entites collide.\\ +Calls a function when two entites collide. \\ Callback syntax: **void MyFunc(string &in asParent, string &in asChild, int alState)** ​ \\ alState: 1 = enter, -1 = leave
-Callback syntax: **void MyFunc(string &in asParent, string &in asChild, int alState)** \\ +
-alState: 1 = enter, -1 = leave+
  
-//​asParentName //- internal name of main object\\ +//​asParentName //- internal name of main object \\ //​asChildName //- internal name of object that collides with main object (asterix (<​nowiki>​*</​nowiki>​) NOT supported!) \\ //​asFunction //- function to call \\ //​abDeleteOnCollide //- determines whether the callback after it was called \\ //alStates //- 1 = only enter, -1 = only leave, 0 = both 
-//​asChildName //- internal name of object that collides with main object (asterix (<​nowiki>​*</​nowiki>​) NOT supported!)\\ + 
-//​asFunction //- function to call\\ +<code c> 
-//​abDeleteOnCollide //- determines whether the callback after it was called\\ +void RemoveEntityCollideCallback(string&​ asParentName,​ string& asChildName);​
-//alStates //- 1 = only enter, -1 = only leave, 0 = both +
-<code c>void RemoveEntityCollideCallback(string&​ asParentName,​ string& asChildName);​+
 </​code>​ </​code>​
  
 Removes an EntityCollideCallback. Asterix (<​nowiki>​*</​nowiki>​) not supported in //​asChildName//​. Removes an EntityCollideCallback. Asterix (<​nowiki>​*</​nowiki>​) not supported in //​asChildName//​.
 +
 <code c> <code c>
 bool GetEntitiesCollide(string&​ asEntityA, string& asEntityB); bool GetEntitiesCollide(string&​ asEntityA, string& asEntityB);
Line 1201: Line 1311:
  
 Checks whether two entites collide. This function does NOT support asterix (<​nowiki>​*</​nowiki>​) or "​Player"​! Checks whether two entites collide. This function does NOT support asterix (<​nowiki>​*</​nowiki>​) or "​Player"​!
-<code c>void SetBodyMass(string &in asName, float afMass);+ 
 +<code c> 
 +void SetBodyMass(string &in asName, float afMass);
 </​code>​ </​code>​
  
Line 1208: Line 1320:
 Sets the mass of an entity'​s body. Sets the mass of an entity'​s body.
  
-//asName// - Name of the body of an entity. The body name of an entity is EntityName_BodyName.\\ +//​asName// ​ - Name of the body of an entity. The body name of an entity is EntityName_BodyName. \\ //​afMass// ​ - The mass to set. 
-//afMass// - The mass to set. + 
-<code c>float GetBodyMass(string &in asName);+<code c> 
 +float GetBodyMass(string &in asName);
 </​code>​ </​code>​
  
Line 1217: Line 1330:
 Gets the mass of an entity'​s body. Gets the mass of an entity'​s body.
  
-//asName// - Name of the body of an entity. The body name of an entity is EntityName_BodyName.\\ +//​asName// ​ - Name of the body of an entity. The body name of an entity is EntityName_BodyName. \\ //​afMass// ​ - The mass to get. 
-//afMass// - The mass to get.+
 === Props === === Props ===
  
-<code c>void SetPropEffectActive(string&​ asName, bool abActive, bool abFadeAndPlaySounds);​+<code c> 
 +void SetPropEffectActive(string&​ asName, bool abActive, bool abFadeAndPlaySounds);​
 </​code>​ </​code>​
  
 Can be used on coal to give it the black color it should have. Can be used on coal to give it the black color it should have.
  
-<code c>void SetPropActiveAndFade(string&​ asName, bool abActive, float afFadeTime);​+<code c> 
 +void SetPropActiveAndFade(string&​ asName, bool abActive, float afFadeTime);​
 </​code>​ </​code>​
  
 Activates/​deactivates a prop. Activates/​deactivates a prop.
  
-//asName //- internal name\\ +//asName //- internal name \\ //abActive //- nothing to add \\ //​afFadeTime //- time in seconds until prop fully fades 
-//abActive //- nothing to add\\ + 
-//​afFadeTime //- time in seconds until prop fully fades +<code c> 
-<code c>void SetPropStaticPhysics(string&​ asName, bool abX);+void SetPropStaticPhysics(string&​ asName, bool abX);
 </​code>​ </​code>​
  
Line 1245: Line 1360:
 Checks whether a prop is interacted with. Checks whether a prop is interacted with.
  
-<code c>void RotatePropToSpeed(string&​ asName, float afAcc, float afGoalSpeed,​ float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed,​ string& asOffsetArea);​+<code c> 
 +void RotatePropToSpeed(string&​ asName, float afAcc, float afGoalSpeed,​ float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed,​ string& asOffsetArea);​
 </​code>​ </​code>​
  
 Rotates the prop up to a set speed. Rotates the prop up to a set speed.
  
-//asName //- internal name\\ +//asName //- internal name \\ //afAcc //- acceleration \\ //​afGoalSpeed //- desired speed \\ //afAxisX //- rotation around X axis \\ //afAxisY //- rotation around Y axis \\ //afAxisZ //- rotation around Z axis \\ //​abResetSpeed //- determines whether the speed is resetted after goal speed is reached \\ //​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 "​StaticObject"​ entity!
-//afAcc //- acceleration\\ +
-//​afGoalSpeed //- desired speed\\ +
-//afAxisX //- rotation around X axis\\ +
-//afAxisY //- rotation around Y axis\\ +
-//afAxisZ //- rotation around Z axis\\ +
-//​abResetSpeed //- determines whether the speed is resetted after goal speed is reached\\ +
-//​asOffsetArea //- the area to rotate around, if ""​, then the center of the body is used+
  
-Note: The entity you want to rotate MUST be a "​StaticObject"​ entity! +<​code>​ 
- +void StopPropMovement(string&​ asName);
-<​code ​c>void StopPropMovement(string&​ asName);+
 </​code>​ </​code>​
  
 Stops all movement of a prop. Stops all movement of a prop.
  
-<​code ​c>void AddAttachedPropToProp(string&​ asPropName, string& asAttachName,​ string& asAttachFile,​ float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);+<​code>​ 
 +void AddAttachedPropToProp(string&​ asPropName, string& asAttachName,​ string& asAttachFile,​ float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);
 </​code>​ </​code>​
  
 Attaches a prop to another prop. Attaches a prop to another prop.
  
-//asPropName ​//- the prop to attach another prop at\\ +a//sPropName//- the prop to attach another prop at \\ //​asAttachName //- internal name of the prop that gets attached \\ //​asAttachFile //- the prop that gets attached extension .ent \\ //afPosX //- X position of the attach from the prop \\ //afPosY //- Y position of the attach from the prop \\ //afPosZ //- Z position of the attach from the prop \\ //afRotX //- rotation around X axis of the attach \\ //afRotY //- rotation around Y axis of the attach \\ //afRotZ //- rotation around ZX axis of the attach Note: for the purposes of "​AddEntityCollideCallback",​ attached props will not call the callback function if they collide with a "​static_object"​ or a "​StaticProp"​ entity type!
-//​asAttachName //- internal name of the prop that gets attached\\ +
-//​asAttachFile //- the prop that gets attached ​  ​extension .ent\\ +
-//afPosX //- X position of the attach from the prop\\ +
-//afPosY //- Y position of the attach from the prop\\ +
-//afPosZ //- Z position of the attach from the prop\\ +
-//afRotX //- rotation around X axis of the attach\\ +
-//afRotY //- rotation around Y axis of the attach\\ +
-//afRotZ //- rotation around ZX axis of the attach +
- +
-Note: for the purposes of "​AddEntityCollideCallback",​ attached props will not call the callback function if they collide with a "​static_object"​ or a "​StaticProp"​ entity type!+
  
-**Bug:** //afRotZ // is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using:\\ +**Bug:​** ​ //afRotZ //  is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using: \\ AddAttachedPropToProp(asPropName,​asAttachName,​asAttachFile,​afPosX,​afPosY,​0,​afPosZ,​90.0f,​afPosZ)
-AddAttachedPropToProp(asPropName,​asAttachName,​asAttachFile,​afPosX,​afPosY,​0,​afPosZ,​90.0f,​afPosZ)+
  
-**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.+**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.
  
-<​code ​c>void AttachPropToProp(string&​ asPropName, string& asAttachName,​ string& asAttachFile,​ float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);+<​code>​ 
 +void AttachPropToProp(string&​ asPropName, string& asAttachName,​ string& asAttachFile,​ float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Attaches a prop to another prop. Fixed version of AddAttachedPropToProp. Attaches a prop to another prop. Fixed version of AddAttachedPropToProp.
  
-//​asPropName //- the prop to attach another prop at\\ +//​asPropName //- the prop to attach another prop at \\ //​asAttachName //- internal name of the prop that gets attached \\ //​asAttachFile //- the prop that gets attached extension .ent \\ //afPosX //- X position of the attach from the prop \\ //afPosY //- Y position of the attach from the prop \\ //afPosZ //- Z position of the attach from the prop \\ //afRotX //- rotation around X axis of the attach \\ //afRotY //- rotation around Y axis of the attach \\ //afRotZ //- rotation around ZX axis of the attach ​Note: for the purposes of "​AddEntityCollideCallback",​ attached props will not call the callback function if they collide with a "​static_object"​ or a "​StaticProp"​ entity type!
-//​asAttachName //- internal name of the prop that gets attached\\ +
-//​asAttachFile //- the prop that gets attached ​  ​extension .ent\\ +
-//afPosX //- X position of the attach from the prop\\ +
-//afPosY //- Y position of the attach from the prop\\ +
-//afPosZ //- Z position of the attach from the prop\\ +
-//afRotX //- rotation around X axis of the attach\\ +
-//afRotY //- rotation around Y axis of the attach\\ +
-//afRotZ //- rotation around ZX axis of the attach+
  
-Note: for the purposes of "​AddEntityCollideCallback",​ attached props will not call the callback function if they collide with a "​static_object"​ or a "​StaticProp"​ entity type! +<​code>​ 
-<​code ​c>void RemoveAttachedPropFromProp(string&​ asPropName, string& asAttachName);​+void RemoveAttachedPropFromProp(string&​ asPropName, string& asAttachName);​
 </​code>​ </​code>​
  
 Detaches a prop from a prop. Detaches a prop from a prop.
  
-<​code ​c>void SetPropHealth(string&​ asName, float afHealth);+<​code>​ 
 +void SetPropHealth(string&​ asName, float afHealth);
 void AddPropHealth(string&​ asName, float afHealth); void AddPropHealth(string&​ asName, float afHealth);
 float GetPropHealth(string&​ asName); float GetPropHealth(string&​ asName);
Line 1317: Line 1410:
 Modifies/​returns the health of a prop. Modifies/​returns the health of a prop.
  
-<​code ​c>void ResetProp(string&​ asName);+<​code>​ 
 +void ResetProp(string&​ asName);
 </​code>​ </​code>​
  
 Resets a prop's state to the original one when the map was loaded. Resets a prop's state to the original one when the map was loaded.
  
-<​code ​c>void PlayPropAnimation(string&​ asProp, string& asAnimation,​ float afFadeTime, bool abLoop, string& asCallback);​+<​code>​ 
 +void PlayPropAnimation(string&​ asProp, string& asAnimation,​ float afFadeTime, bool abLoop, string& asCallback);​
 </​code>​ </​code>​
  
-Makes the prop play an animation and calls a function.\\ +Makes the prop play an animation and calls a function. \\ Callback syntax: **void MyFunc(string &in asProp)**
-Callback syntax: **void MyFunc(string &in asProp)**+
  
-//asProp //- internal name of the prop\\ +//asProp //- internal name of the prop \\ //​asAnimation //- animation to play \\ //​afFadeTime //- ? \\ //abLoop //- determines whether the animation loops \\ //​asCallback //- function to call 
-//​asAnimation //- animation to play\\ + 
-//​afFadeTime //- ?\\ +<​code>​ 
-//abLoop //- determines whether the animation loops\\ +void AddPropForce(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​
-//​asCallback //- function to call +
-<​code ​c>void AddPropForce(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​+
 void AddPropImpulse(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​ void AddPropImpulse(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​
 void AddBodyForce(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​ void AddBodyForce(string&​ asName, float afX, float afY, float afZ, string& asCoordSystem);​
Line 1339: Line 1431:
 </​code>​ </​code>​
  
-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. +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 "​Body"​ 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).
- +
-A "​Body"​ 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).+
  
-//asName //- the object to push; for bodies, use this format: "//​entityName//​_//​bodyName//"​\\ +//asName //- the object to push; for bodies, use this format: "//​entityName//​_//​bodyName//"​ \\ //afX //- magnitude along the X-axis \\ //afY //- magnitude along the Y-axis \\ //afZ //- magnitude along the Z-axis \\ //​asCoordSystem //- determines which coordinate system is used, usually "​world" ​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.
-//afX //- magnitude along the X-axis\\ +
-//afY //- magnitude along the Y-axis\\ +
-//afZ //- magnitude along the Z-axis\\ +
-//​asCoordSystem //- determines which coordinate system is used, usually "​world"​+
  
-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. 
 === Connections === === Connections ===
  
-<​code ​c>void InteractConnectPropWithRope(string&​ asName, string& asPropName, string& asRopeName, bool abInteractOnly,​ +<​code>​ 
-float afSpeedMul, float afToMinSpeed,​ float afToMaxSpeed,​ bool abInvert, int alStatesUsed);​+void InteractConnectPropWithRope(string&​ asName, string& asPropName, string& asRopeName, bool abInteractOnly,​ float afSpeedMul, float afToMinSpeed,​ float afToMaxSpeed,​ bool abInvert, int alStatesUsed);​
 </​code>​ </​code>​
  
 Connects a prop with the movement of a rope (ie. turn wheel to move rope). Connects a prop with the movement of a rope (ie. turn wheel to move rope).
  
-//asName //- connection name\\ +//asName //- connection name \\ //​asPropName //- name of prop \\ //​asRopeName //- name of rope \\ //​abInteractOnly //- ? \\ //​afSpeedMul //- speed multiplier of how quickly the rope moves \\ //​afToMinSpeed //- the slowest the rope will move when moving the prop \\ //​afToMaxSpeed //- the fastest the rope will move when moving the prop \\ //abInvert //- whether to invert the direction the rope moves \\ //​alStatesUsed //- which states of the prop can interact with the rope? 
-//​asPropName //- name of prop\\ + 
-//​asRopeName //- name of rope\\ +<​code>​ 
-//​abInteractOnly //- ?\\ +void InteractConnectPropWithMoveObject(string&​ asName, string& asPropName, string& asMoveObjectName,​ bool abInteractOnly,​ bool abInvert, int alStatesUsed);​
-//​afSpeedMul //- speed multiplier of how quickly the rope moves\\ +
-//​afToMinSpeed //- the slowest the rope will move when moving the prop\\ +
-//​afToMaxSpeed //- the fastest the rope will move when moving the prop\\ +
-//abInvert //- whether to invert the direction the rope moves\\ +
-//​alStatesUsed //- which states of the prop can interact with the rope? +
-<​code ​c>void InteractConnectPropWithMoveObject(string&​ asName, string& asPropName, string& asMoveObjectName,​ bool abInteractOnly,​ +
-bool abInvert, int alStatesUsed);​+
 </​code>​ </​code>​
  
 This one should only be used if there must be an exact correspondance to prope "​amount"​ and the moveobject open amount. It is best used for Wheel-door connections! This one should only be used if there must be an exact correspondance to prope "​amount"​ and the moveobject open amount. It is best used for Wheel-door connections!
  
-<​code ​c>void ConnectEntities(string&​ asName, string& asMainEntity,​ string& asConnectEntity,​ bool abInvertStateSent,​ int alStatesUsed,​ string& asCallbackFunc);​+<​code>​ 
 +void ConnectEntities(string&​ asName, string& asMainEntity,​ string& asConnectEntity,​ bool abInvertStateSent,​ int alStatesUsed,​ string& asCallbackFunc);​
 </​code>​ </​code>​
  
-Callback syntax: **void MyFunc(string &in asConnectionName,​ string &in asMainEntity,​ string &in asConnectEntity,​ int alState)** \\ +Callback syntax: **void MyFunc(string &in asConnectionName,​ string &in asMainEntity,​ string &in asConnectEntity,​ int alState)** ​ \\ State is what is sent to connection entity and will be inverted if abInvertStateSent = true!
-State is what is sent to connection entity and will be inverted if abInvertStateSent = true!+
  
 === Lamps === === Lamps ===
  
-<​code ​c>void SetLampLit(string&​ asName, bool abLit, bool abEffects);+<​code>​ 
 +void SetLampLit(string&​ asName, bool abLit, bool abEffects);
 </​code>​ </​code>​
  
 (Un)lits a lamp. (Un)lits a lamp.
  
-//asName //- Name of the lamp\\ +//asName //- Name of the lamp \\ //abLit //- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit \\ //abEffects //- If you want to have the lamp fade in/out when it gets (un)lit 
-//abLit //- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit\\ +
-//abEffects //- If you want to have the lamp fade in/out when it gets (un)lit+
 === Doors === === Doors ===
  
-<​code ​c>void SetSwingDoorLocked(string&​ asName, bool abLocked, bool abEffects);+<​code>​ 
 +void SetSwingDoorLocked(string&​ asName, bool abLocked, bool abEffects);
 void SetSwingDoorClosed(string&​ asName, bool abClosed, bool abEffects); void SetSwingDoorClosed(string&​ asName, bool abClosed, bool abEffects);
 </​code>​ </​code>​
Line 1397: Line 1476:
 Locks/​closes a swing door. Locks/​closes a swing door.
  
-<​code ​c>+<​code>​
 bool GetSwingDoorLocked(string&​ asName); bool GetSwingDoorLocked(string&​ asName);
 bool GetSwingDoorClosed(string&​ asName); bool GetSwingDoorClosed(string&​ asName);
Line 1404: Line 1483:
 Checks whether a swing door is locked/​closed. Checks whether a swing door is locked/​closed.
  
-<​code ​c>void SetSwingDoorDisableAutoClose(string&​ asName, bool abDisableAutoClose);​+<​code>​ 
 +void SetSwingDoorDisableAutoClose(string&​ asName, bool abDisableAutoClose);​
 </​code>​ </​code>​
  
 Deactivates the "​auto-close"​ when a door is nearly closed. Deactivates the "​auto-close"​ when a door is nearly closed.
  
-<​code ​c>int GetSwingDoorState(string&​ asName);+<​code>​ 
 +int GetSwingDoorState(string&​ asName);
 </​code>​ </​code>​
  
-Returns an integer depending on how far the door is opened.\\ +Returns an integer depending on how far the door is opened. \\ -1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.
--1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.+
  
-<​code ​c>void SetLevelDoorLocked(string&​ asName, bool abLocked);+<​code>​ 
 +void SetLevelDoorLocked(string&​ asName, bool abLocked);
 </​code>​ </​code>​
  
 Locks a level door. Note that level doors are NOT swing doors. Locks a level door. Note that level doors are NOT swing doors.
  
-<​code ​c>void SetLevelDoorLockedSound(string&​ asName, string& asSound);+<​code>​ 
 +void SetLevelDoorLockedSound(string&​ asName, string& asSound);
 </​code>​ </​code>​
  
 Determines which sound is played when interacting with a locked level door. Determines which sound is played when interacting with a locked level door.
  
-<​code ​c>void SetLevelDoorLockedText(string&​ asName, string& asTextCat, string& asTextEntry);​+<​code>​ 
 +void SetLevelDoorLockedText(string&​ asName, string& asTextCat, string& asTextEntry);​
 </​code>​ </​code>​
  
 Displays a message when interacting with a locked level door. Displays a message when interacting with a locked level door.
  
-//asName //- internal name\\ +//asName //- internal name \\ //asTextCat //- the category in the .lang file \\ //​asTextEntry //- the entry in the .lang file 
-//asTextCat //- the category in the .lang file\\ + 
-//​asTextEntry //- the entry in the .lang file +<​code>​ 
-<​code ​c>void SetMoveObjectState(string&​ asName, float afState);+void SetMoveObjectState(string&​ asName, float afState);
 </​code>​ </​code>​
  
 Moves an object to a certain state. Moves an object to a certain state.
  
-//asName //- internal name\\ +//asName //- internal name \\ //afState //- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too! 
-//afState //- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too! + 
-<​code ​c>void SetMoveObjectStateExt(string&​ asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist,​ bool abResetSpeed);​+<​code>​ 
 +void SetMoveObjectStateExt(string&​ asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist,​ bool abResetSpeed);​
 </​code>​ </​code>​
  
 Moves an object to a certain state, extended method. Moves an object to a certain state, extended method.
  
-//asName //- internal name\\ +//asName //- internal name \\ //afState //- state of the object, 0 = closed, 1 = open, values inbetween are valid too! \\ //afAcc //- acceleration \\ //​afMaxSpeed //- maximum speed \\ //​afSlowdownDist //- Distance to the target state before decceleration occurs. \\ //​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. 
-//afState //- state of the object, 0 = closed, 1 = open, values inbetween are valid too!\\ +
-//afAcc //- acceleration\\ +
-//​afMaxSpeed //- maximum speed\\ +
-//​afSlowdownDist //- Distance to the target state before decceleration occurs.\\ +
-//​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.+
 === Levers, wheels and buttons === === Levers, wheels and buttons ===
  
-<​code ​c>void SetPropObjectStuckState(string&​ asName, int alState);+<​code>​ 
 +void SetPropObjectStuckState(string&​ asName, int alState);
 void SetWheelStuckState(string&​ asName, int alState, bool abEffects); void SetWheelStuckState(string&​ asName, int alState, bool abEffects);
 void SetLeverStuckState(string&​ asName, int alState, bool abEffects); void SetLeverStuckState(string&​ asName, int alState, bool abEffects);
Line 1460: Line 1541:
 Makes a prop<​nowiki>​\</​nowiki>​wheel<​nowiki>​\</​nowiki>​lever stuck in a certain state. Makes a prop<​nowiki>​\</​nowiki>​wheel<​nowiki>​\</​nowiki>​lever stuck in a certain state.
  
-//asName //- internal name\\ +//asName //- internal name \\ //alState //- 0 = not stuck, 1 = at max, -1 = at min \\ //abEffects //- use effects 
-//alState //- 0 = not stuck, 1 = at max, -1 = at min\\ + 
-//abEffects //- use effects +<​code>​ 
-<​code ​c>void SetWheelAngle(string&​ asName, float afAngle, bool abAutoMove);​+void SetWheelAngle(string&​ asName, float afAngle, bool abAutoMove);​
 </​code>​ </​code>​
  
 Moves a wheel to a certain angle. Moves a wheel to a certain angle.
  
-//asName //- internal name\\ +//asName //- internal name \\ //afAngle //- angle \\ //​abAutoMove //- determines whether the wheel should move on its own 
-//afAngle //- angle\\ + 
-//​abAutoMove //- determines whether the wheel should move on its own +<​code>​ 
-<​code ​c>void SetWheelInteractionDisablesStuck(string&​ asName, bool abX);+void SetWheelInteractionDisablesStuck(string&​ asName, bool abX);
 void SetLeverInteractionDisablesStuck(string&​ asName, bool abX); void SetLeverInteractionDisablesStuck(string&​ asName, bool abX);
 </​code>​ </​code>​
Line 1477: Line 1558:
 Allows the player to make a wheel/lever unstuck when interacted with. Allows the player to make a wheel/lever unstuck when interacted with.
  
-<​code ​c>int GetLeverState(string&​ asName);+<​code>​ 
 +int GetLeverState(string&​ asName);
 </​code>​ </​code>​
  
-Returns the state of the lever.\\ +Returns the state of the lever. \\ 0 = not stuck, 1 = at max, -1 = at min
-0 = not stuck, 1 = at max, -1 = at min+
  
-<​code ​c>void SetMultiSliderStuckState(string&​ asName, int alStuckState,​ bool abEffects);+<​code>​ 
 +void SetMultiSliderStuckState(string&​ asName, int alStuckState,​ bool abEffects);
 </​code>​ </​code>​
  
 Makes a MultiSlider stuck in a certain state. Makes a MultiSlider stuck in a certain state.
  
-<​code ​c>void SetMultiSliderCallback(string&​ asName, string& asCallback);​+<​code>​ 
 +void SetMultiSliderCallback(string&​ asName, string& asCallback);​
 </​code>​ </​code>​
  
-Calls a function when state changes.\\ +Calls a function when state changes. \\ Callback syntax: **void MyFunc(string &in asEntity, int alState)** 
-Callback syntax: **void MyFunc(string &in asEntity, int alState)** + 
-<​code ​c>void SetButtonSwitchedOn(string&​ asName, bool abSwitchedOn,​ bool abEffects);+<​code>​ 
 +void SetButtonSwitchedOn(string&​ asName, bool abSwitchedOn,​ bool abEffects);
 </​code>​ </​code>​
  
 === Sticky areas === === Sticky areas ===
  
-<​code ​c>void SetAllowStickyAreaAttachment(bool abX);+<​code>​ 
 +void SetAllowStickyAreaAttachment(bool abX);
 </​code>​ </​code>​
  
 Allows entites to stick to a StickyArea. Allows entites to stick to a StickyArea.
  
-<​code ​c>void AttachPropToStickyArea(string&​ asAreaName, string& asProp);+<​code>​ 
 +void AttachPropToStickyArea(string&​ asAreaName, string& asProp);
 void AttachBodyToStickyArea(string&​ asAreaName, string& asBody); void AttachBodyToStickyArea(string&​ asAreaName, string& asBody);
 </​code>​ </​code>​
Line 1509: Line 1595:
 Attaches a prop/body to a StickyArea. Attaches a prop/body to a StickyArea.
  
-<​code ​c>void DetachFromStickyArea(string&​ asAreaName);​+<​code>​ 
 +void DetachFromStickyArea(string&​ asAreaName);​
 </​code>​ </​code>​
  
Line 1516: Line 1603:
 === Enemies === === Enemies ===
  
-<​code ​c>void SetNPCAwake(string&​ asName, bool abAwake, bool abEffects);+<​code>​ 
 +void SetNPCAwake(string&​ asName, bool abAwake, bool abEffects);
 </​code>​ </​code>​
  
 Activates the npc Activates the npc
  
-<​code ​c>void SetNPCFollowPlayer(string&​ asName, bool abX);+<​code>​ 
 +void SetNPCFollowPlayer(string&​ asName, bool abX);
 </​code>​ </​code>​
  
 Sets an NPC's head to follow the player'​s movement'​s. Sets an NPC's head to follow the player'​s movement'​s.
  
-<​code ​c>void SetEnemyDisabled(string&​ asName, bool abDisabled);​+<​code>​ 
 +void SetEnemyDisabled(string&​ asName, bool abDisabled);​
 </​code>​ </​code>​
  
 Disables an enemy. Disables an enemy.
  
-<​code ​c>void SetEnemyIsHallucination(string&​ asName, bool abX);+<​code>​ 
 +void SetEnemyIsHallucination(string&​ asName, bool abX);
 </​code>​ </​code>​
  
 Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player. Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.
  
-<​code ​c>void FadeEnemyToSmoke(string&​ asName, bool abPlaySound);​+<​code>​ 
 +void FadeEnemyToSmoke(string&​ asName, bool abPlaySound);​
 </​code>​ </​code>​
  
 Instantly fades an enemy to smoke. Instantly fades an enemy to smoke.
  
-<​code ​c>void ShowEnemyPlayerPosition(string&​ asName);+<​code>​ 
 +void ShowEnemyPlayerPosition(string&​ asName);
 </​code>​ </​code>​
  
 Makes the enemy run to the player, no matter where he is. Makes the enemy run to the player, no matter where he is.
  
-<​code ​c>void AlertEnemyOfPlayerPresence(string &in asName);+<​code>​ 
 +void AlertEnemyOfPlayerPresence(string &in asName);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Gives the specified enemy the player'​s current position and makes it search the area. Gives the specified enemy the player'​s current position and makes it search the area.
  
-<​code ​c>void SetEnemyDisableTriggers(string&​ asName, bool abX);+<​code>​ 
 +void SetEnemyDisableTriggers(string&​ asName, bool abX);
 </​code>​ </​code>​
  
 Enables or disables enemy triggers. If disabled, enemy will not react to player or attack. Enables or disables enemy triggers. If disabled, enemy will not react to player or attack.
  
-<​code ​c>void AddEnemyPatrolNode(string&​ asName, string& asNodeName, float afWaitTime, string& asAnimation);​+<​code>​ 
 +void AddEnemyPatrolNode(string&​ asName, string& asNodeName, float afWaitTime, string& asAnimation);​
 </​code>​ </​code>​
  
 Adds a patrol node to the enemy'​s path. Adds a patrol node to the enemy'​s path.
  
-//asName //- internal name of the enemy\\ +//asName //- internal name of the enemy \\ //​asNodeName //- path node \\ //​afWaitTime //- time in seconds that the enemy waits at the path node before continuing \\ //​asAnimation //- the animation the enemy uses when reaching the path node 
-//​asNodeName //- path node\\ + 
-//​afWaitTime //- time in seconds that the enemy waits at the path node before continuing\\ +<​code>​ 
-//​asAnimation //- the animation the enemy uses when reaching the path node +void ClearEnemyPatrolNodes(string&​ asEnemyName);​
-<​code ​c>void ClearEnemyPatrolNodes(string&​ asEnemyName);​+
 </​code>​ </​code>​
  
 Clears the current path of patrol nodes of the enemy. Clears the current path of patrol nodes of the enemy.
  
-<​code ​c>void SetEnemySanityDecreaseActive(string &in asName, bool abX);+<​code>​ 
 +void SetEnemySanityDecreaseActive(string &in asName, bool abX);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Enables/​disables whether an enemy activates the player'​s sanity drain when stared at. Enables/​disables whether an enemy activates the player'​s sanity drain when stared at.
  
-//asName //- Internal name of the enemy\\ +//asName //- Internal name of the enemy \\ //abX //- Enabled/​disabled
-//abX //- Enabled/​disabled+
  
-<​code ​c>void TeleportEnemyToNode(string &in asEnemyName,​ string &in asNodeName, bool abChangeY);+<​code>​ 
 +void TeleportEnemyToNode(string &in asEnemyName,​ string &in asNodeName, bool abChangeY);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Teleports an enemy to a specific PathNode. Teleports an enemy to a specific PathNode.
  
-//​asEnemyName //- Internal name of the enemy\\ +//​asEnemyName //- Internal name of the enemy \\ //​asNodeName //- Internal name of the node to teleport to \\ //abChangeY //- Whether ​the Y position of the node will be used when teleporting the enemy
-//​asNodeName //- Internal name of the node to teleport to\\ +
-//abChangeY //- Wether ​the Y position of the node will be used when teleporting the enemy+
  
-<​code ​c>void TeleportEnemyToEntity(string &in asEnemyName,​ string &in asTargetEntity,​ string &in asTargetBody,​ bool abChangeY);+<​code>​ 
 +void TeleportEnemyToEntity(string &in asEnemyName,​ string &in asTargetEntity,​ string &in asTargetBody,​ bool abChangeY);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Teleports an enemy to a specific entity. Teleports an enemy to a specific entity.
  
-//​asEnemyName //- Internal name of the enemy\\ +//​asEnemyName //- Internal name of the enemy \\ //​asTargetEntity //- Internal name of the entity to teleport to \\ //​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) \\ //abChangeY //- Whether ​the Y position of the node will be used when teleporting the enemy
-//​asTargetEntity //- Internal name of the entity to teleport to\\ +
-//​asTargetBody//​- Internal name of the entity'​s body name to teleport to. If "" ​the first body will be used (might be unstable, recommended to input a body anyway)\\ +
-//abChangeY //- Wether ​the Y position of the node will be used when teleporting the enemy+
  
-<code c>void ChangeManPigPose(string&​in asName, string&​in asPoseType);​+<code c> 
 +void ChangeManPigPose(string&​in asName, string&​in asPoseType);​
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Changes the pose a specified ManPig. Changes the pose a specified ManPig.
  
-//asName //- Internal name of the enemy\\ +//asName //- Internal name of the enemy \\ //​asPoseType//​- Name of the ManPig pose to use. Can be "​Biped"​ or "​Quadruped"​
-//​asPoseType//​- Name of the ManPig pose to use. Can be "​Biped"​ or "​Quadruped"​\\+
  
-<code c>void SetTeslaPigFadeDisabled(string&​in asName, bool abX);+<code c> 
 +void SetTeslaPigFadeDisabled(string&​in asName, bool abX);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-Enables/​disables ​wether ​a specified TeslaPig should fade the player'​s view in and out.+Enables/​disables ​whether ​a specified TeslaPig should fade the player'​s view in and out.
  
-//asName //- Internal name of the enemy\\ +//asName //- Internal name of the enemy \\ //abX//- Enabled/​disabled
-//abX//- Enabled/​disabled\\+
  
-<code c>void SetTeslaPigSoundDisabled(string&​in asName, bool abX);+<code c> 
 +void SetTeslaPigSoundDisabled(string&​in asName, bool abX);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-Enables/​disables ​wether ​a specified TeslaPig should play the proximity sounds.+Enables/​disables ​whether ​a specified TeslaPig should play the proximity sounds.
  
-//asName //- Internal name of the enemy\\ +//asName //- Internal name of the enemy \\ //abX//- Enabled/​disabled
-//abX//- Enabled/​disabled\\+
  
-<code c>void SetTeslaPigEasyEscapeDisabled(string&​in asName, bool abX);+<code c> 
 +void SetTeslaPigEasyEscapeDisabled(string&​in asName, bool abX);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-Enables/​disables ​wether ​a specified TeslaPig should be easier to escape from when hunted.+Enables/​disables ​whether ​a specified TeslaPig should be easier to escape from when hunted.
  
-//asName //- Internal name of the enemy\\ +//asName //- Internal name of the enemy \\ //abX//- Enabled/​disabled
-//abX//- Enabled/​disabled\\+
  
-<code c>void ForceTeslaPigSighting(string&​in asName);+<code c> 
 +void ForceTeslaPigSighting(string&​in asName);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
 Forces a TeslaPig to be visible for a short time. Forces a TeslaPig to be visible for a short time.
  
-//asName //- Internal name of the enemy\\+//asName //- Internal name of the enemy
  
-<code c>​string&​ GetEnemyStateName(string &in asName);+<code c> 
 +string& GetEnemyStateName(string &in asName);
 </​code>​ </​code>​
 +
 :!: **Requires 1.3** :!: **Requires 1.3**
  
-Returns the name of the state a specified enemy is current in.+Returns the name of the state a specified enemy is current in. States can be Hunt, Search, Patrol, Wait, Alert, Investigate,​ Track and BreakDoor.
  
-//asName //- Internal name of the enemy\\+//asName //- Internal name of the enemy
  
hpl2/amnesia/script_functions.1411217689.txt.gz · Last modified: 2014/09/20 12:54 by mudbill