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/12/05 08:50]
mudbill
hpl2:amnesia:script_functions [2019/09/19 17:44] (current)
darkfire [Debugging]
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>​
  
Line 36: Line 41:
 //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>​
  
Line 62: Line 68:
 //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.
Line 84: Line 92:
 :!: **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 97: Line 106:
  
 //afX// - Value to operate. //afX// - Value to operate.
-<code c++>​float MathCos(float afX);+<code c++> 
 +float MathCos(float afX);
 </​code>​ </​code>​
  
Line 105: Line 115:
  
 //afX// - Value to operate. //afX// - Value to operate.
-<code c++>​float MathTan(float afX);+<code c++> 
 +float MathTan(float afX);
 </​code>​ </​code>​
  
Line 113: Line 124:
  
 //afX// - Value to operate. //afX// - Value to operate.
-<code c++>​float MathAsin(float afX);+<code c++> 
 +float MathAsin(float afX);
 </​code>​ </​code>​
  
Line 121: Line 133:
  
 //afX// - Value to operate. //afX// - Value to operate.
-<code c++>​float MathAcos(float afX);+<code c++> 
 +float MathAcos(float afX);
 </​code>​ </​code>​
  
Line 129: Line 142:
  
 //afX// - Value to operate. //afX// - Value to operate.
-<code c++>​float MathAtan(float afX);+<code c++> 
 +float MathAtan(float afX);
 </​code>​ </​code>​
  
Line 137: Line 151:
  
 //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 146: Line 161:
 //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 154: Line 170:
  
 //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 163: Line 180:
 //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 172: Line 190:
 //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 181: Line 200:
 //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 191: Line 211:
 //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 201: Line 222:
 ==== 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 (''​hpl.log''​)
- +<code c++> 
-<code c++>void AddDebugMessage(string&​ asString, bool abCheckForDuplicates);​+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.\\ 
 +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();​
Line 233: Line 261:
 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++>void SetLocalVarFloat(string&​ asName, float afVal);+<code c++> 
 +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++>void SetLocalVarString(string&​ asName, const string& asVal);+<code c++> 
 +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 283:
 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++>void SetGlobalVarFloat(string&​ asName, float afVal);+<code c++> 
 +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++>void SetGlobalVarString(string&​ asName, const string& asVal);+<code c++> 
 +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 303:
 ==== 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. Extension: .ps
  
-<code c++>void CreateParticleSystemAtEntity(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS);+<code c++> 
 +void CreateParticleSystemAtEntity(string&​ asPSName, string& asPSFile, string& asEntity, bool abSavePS);
 </​code>​ </​code>​
  
Line 283: Line 319:
 //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 303: Line 340:
 //​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>​
  
Line 310: Line 348:
 ==== 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. Extension: .snt
  
-<code c++>void PlaySoundAtEntity(string&​ asSoundName,​ string& asSoundFile,​ string& asEntity, float afFadeTime, bool abSaveSound);​+<code c++> 
 +void PlaySoundAtEntity(string&​ asSoundName,​ string& asSoundFile,​ string& asEntity, float afFadeTime, bool abSaveSound);​
 </​code>​ </​code>​
  
Line 325: Line 365:
 //​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>​
  
Line 333: Line 374:
 //​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>​
  
Line 340: Line 382:
 //​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>​
  
Line 350: Line 393:
 //​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>​
  
Line 358: Line 402:
 //​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>​
  
Line 374: Line 420:
 ==== Lights ==== ==== Lights ====
  
-<code c++>void SetLightVisible(string&​ asLightName,​ bool abVisible);+<code c++> 
 +void SetLightVisible(string&​ asLightName,​ bool abVisible);
 </​code>​ </​code>​
  
Line 381: Line 428:
 //​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>​
  
Line 393: Line 441:
 //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>​
  
Line 402: Line 451:
 ==== 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>​
  
Line 412: Line 462:
 //​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>​
  
Line 434: Line 487:
 //​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>​
  
Line 443: Line 497:
 //​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 510:
 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>​
  
Line 460: Line 517:
  
 //​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<​nowiki>​\</​nowiki>​Disables the skybox.
-<code c++>void SetSkyBoxTexture(string&​ asTexture);+ 
 +<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);+<code c++> 
 +void SetSkyBoxColor(float afR, float afG, float afB, float afA);
 </​code>​ </​code>​
  
Line 476: Line 537:
 //afB //- blue value\\ //afB //- blue value\\
 //afA //- alpha value //afA //- alpha value
-<code c++>void SetFogActive(bool abActive);+<code c++> 
 +void SetFogActive(bool abActive);
 </​code>​ </​code>​
  
 Enables<​nowiki>​\</​nowiki>​Disables the global fog. Enables<​nowiki>​\</​nowiki>​Disables the global fog.
-<code c++>void SetFogColor(float afR, float afG, float afB, float afA);+ 
 +<code c++> 
 +void SetFogColor(float afR, float afG, float afB, float afA);
 </​code>​ </​code>​
  
Line 487: Line 551:
 //afB //- blue value\\ //afB //- blue value\\
 //afA //- alpha value //afA //- alpha value
-<code c++>void SetFogProperties(float afStart, float afEnd, float afFalloffExp,​ bool abCulling);+<code c++> 
 +void SetFogProperties(float afStart, float afEnd, float afFalloffExp,​ bool abCulling);
 </​code>​ </​code>​
  
Line 494: Line 559:
 //​afFalloffExp //- the amount by which the thinkness increases\\ //​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 //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 c++> 
 +void SetupLoadScreen(string&​asTextCat,​ string&​asTextEntry,​ int alRandomNum,​ string&​asImageFile);​
 </​code>​ </​code>​
  
Line 505: Line 571:
 ==== 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>​
  
Line 514: Line 581:
 //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);+<code c++> 
 +float GetTimerTimeLeft(string&​ asName);
 </​code>​ </​code>​
  
Line 526: Line 595:
 ==== Screen Effects ==== ==== Screen Effects ====
  
-<code c++>void FadeOut(float afTime);+<code c++> 
 +void FadeOut(float afTime);
 </​code>​ </​code>​
  
Line 532: Line 602:
  
 //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 609:
  
 //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>​
  
Line 545: Line 617:
 //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>​
  
Line 552: Line 625:
 //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>​
  
Line 559: Line 633:
 //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 640:
  
 //​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>​
  
Line 573: Line 649:
 //afWhite //- determines to which percentage the screen fades to white (1.0 = completly 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 //afFadeOut //- time in seconds until screen is back to normal again
-<code c++>void StartEffectEmotionFlash(string&​ asTextCat, string& asTextEntry,​ string& asSound);+<code c++> 
 +void StartEffectEmotionFlash(string&​ asTextCat, string& asTextEntry,​ string& asSound);
 </​code>​ </​code>​
  
Line 581: Line 658:
 //​asTextEntry //- the text entry in the .lang file\\ //​asTextEntry //- the text entry in the .lang file\\
 //asSound //- the sound to play while fading //asSound //- the sound to play while fading
-<code c++>void AddEffectVoice(string&​ asVoiceFile,​ string& asEffectFile,​ string& asTextCat, string& asTextEntry,​+<code c++> 
 +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 595: Line 673:
 //​afMinDistance //- minimum distance to see the effect\\ //​afMinDistance //- minimum distance to see the effect\\
 //​afMaxDistance //- maximum distance to see the effect //​afMaxDistance //- maximum distance to see the effect
-<code c++>void StopAllEffectVoices(float afFadeOutTime);​+<code c++> 
 +void StopAllEffectVoices(float afFadeOutTime);​
 </​code>​ </​code>​
  
Line 606: Line 685:
 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>​
  
Line 617: Line 697:
 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 does, but it has something to do with particle systems.+Spawns ​particle systems ​around the player. It uses the settings from ''​.sps''​ files which are located in the ''/​misc''​ folder.\\ 
 +Can be used e.g. to continuously spawn fog effects around the player.
  
-<code c++>void PlayGuiSound(string&​ asSoundFile,​ float afVolume);+<code c++> 
 +void PlayGuiSound(string&​ asSoundFile,​ float afVolume);
 </​code>​ </​code>​
  
Line 630: Line 713:
 //​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>​
  
Line 639: Line 723:
 //​afFadeInTime //- time in seconds until full intensity is reached\\ //​afFadeInTime //- time in seconds until full intensity is reached\\
 //​afFadeOutTime //- time until screen is back to normal //​afFadeOutTime //- time until screen is back to normal
-<code c++>void SetInDarknessEffectsActive(bool abX);+<code c++> 
 +void SetInDarknessEffectsActive(bool abX);
 </​code>​ </​code>​
  
Line 649: Line 734:
 ==== Insanity ==== ==== Insanity ====
  
-<code c++>void SetInsanitySetEnabled(string&​ asSet, bool abX);+<code c++> 
 +void SetInsanitySetEnabled(string&​ asSet, bool abX);
 </​code>​ </​code>​
  
Line 656: Line 742:
 //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 751:
  
 //​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 766:
  
 <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 775:
 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>​
  
Line 710: Line 803:
 //afZ //- amount along the Z-axis\\ //afZ //- amount along the Z-axis\\
 //​abUseLocalCoords //- If true, axes are based on where the player is facing, not the world. //​abUseLocalCoords //- If true, axes are based on where the player is facing, not the world.
-<code c++>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 817:
 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 825:
 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 833:
 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 840:
 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 853:
 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>​
  
Line 760: Line 861:
 //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>​
  
Line 769: Line 871:
 //​abSpinHead //- changes the camera view when damage is dealt\\ //​abSpinHead //- changes the camera view when damage is dealt\\
 //abLethal //- set to true if player can die from given damage //abLethal //- set to true if player can die from given damage
-<code c++>void FadePlayerFOVMulTo(float afX, float afSpeed);+<code c++> 
 +void FadePlayerFOVMulTo(float afX, float afSpeed);
 </​code>​ </​code>​
  
Line 776: Line 879:
 //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>​
  
Line 783: Line 887:
 //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>​
  
Line 791: Line 896:
 //​afSpeedMul //- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)\\ //​afSpeedMul //- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)\\
 //​afMaxSpeed //- maximum speed of rotation //​afMaxSpeed //- maximum speed of rotation
-<code c++>void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);​+<code c++> 
 +void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);​
 </​code>​ </​code>​
  
Line 801: Line 907:
 //afSpeed //- speed at which the change happens\\ //afSpeed //- speed at which the change happens\\
 //​afSlowDownDist //- distance at which to start slowing down (prevents the head from abruptly stopping) //​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);​+<code c++> 
 +void StartPlayerLookAt(string&​ asEntityName,​ float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);​
 void StopPlayerLookAt();​ void StopPlayerLookAt();​
 </​code>​ </​code>​
Line 811: Line 918:
 //​afMaxSpeed //- maximum speed allowed\\ //​afMaxSpeed //- maximum speed allowed\\
 //​asAtTargetCallback //- function to call when player looks at target //​asAtTargetCallback //- function to call when player looks at target
-<code c++>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 926:
 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 934:
 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 941:
 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 959:
 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>​
  
Line 865: Line 980:
 //​asTextEntry //- the entry 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. //afTime //- determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length.
-<code c++>void SetDeathHint(string&​ asTextCategory,​ string& asTextEntry);​+<code c++> 
 +void SetDeathHint(string&​ asTextCategory,​ string& asTextEntry);​
 </​code>​ </​code>​
  
Line 872: Line 988:
 //​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 1000:
 "​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 1008:
 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 900: Line 1019:
 //afY// - Y co-ordinate position.\\ //afY// - Y co-ordinate position.\\
 //afZ// - Z co-ordinate position. //afZ// - Z co-ordinate position.
-<code c++>​float GetPlayerPosX();​+<code c++> 
 +float GetPlayerPosX();​
 float GetPlayerPosY();​ float GetPlayerPosY();​
 float GetPlayerPosZ();​ float GetPlayerPosZ();​
Line 911: Line 1031:
 ==== Journal ==== ==== Journal ====
  
-<code c++>void AddNote(string&​ asNameAndTextEntry,​ string& asImage);+<code c++> 
 +void AddNote(string&​ asNameAndTextEntry,​ string& asImage);
 </​code>​ </​code>​
  
Line 918: Line 1039:
 //​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>​
  
Line 925: Line 1047:
 //​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 1055:
 ==== Quests ==== ==== Quests ====
  
-<code c++>void AddQuest(string&​ asName, string& asNameAndTextEntry);​+<code c++> 
 +void AddQuest(string&​ asName, string& asNameAndTextEntry);​
 </​code>​ </​code>​
  
Line 939: Line 1063:
 //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>​
  
Line 953: Line 1078:
 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>​
  
Line 967: Line 1095:
 //​asMessageEntry //- the entry 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. //​afTimeShown //- time in seconds until the message disappears. If time is <= 0 then the life time is calculated based on string length.
-<code c++>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 1102:
  
 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>​
  
Line 993: Line 1126:
 //​asTextEntry //- the entry 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. //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++>void GiveItem(string&​ asName, string& asType, string& asSubTypeName,​ string& asImageName,​ float afAmount);+<code c++> 
 +void GiveItem(string&​ asName, string& asType, string& asSubTypeName,​ string& asImageName,​ float afAmount);
 </​code>​ </​code>​
  
Line 1001: Line 1135:
 //asType //- item to give\\ //asType //- item to give\\
 //​asSubTypeName //- item name for .lang file\\ //​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]]+//​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 1150:
 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>​
  
Line 1022: Line 1158:
 //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>​
  
Line 1033: Line 1170:
 //​asFunction //- the function to call\\ //​asFunction //- the function to call\\
 //​abAutoRemove //- determines whether the callback should be removed when the items are combined //​abAutoRemove //- determines whether the callback should be removed when the items are combined
-<code c++>void RemoveCombineCallback(string&​ asName);+<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>​
  
Line 1049: Line 1188:
 //​asFunction //- function to call\\ //​asFunction //- function to call\\
 //​abAutoDestroy //- determines whether the item is destroyed when used //​abAutoDestroy //- determines whether the item is destroyed when used
-<code c++>void RemoveUseItemCallback(string&​ asName);+<code c++> 
 +void RemoveUseItemCallback(string&​ asName);
 </​code>​ </​code>​
  
Line 1058: Line 1198:
 === 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 1078: Line 1220:
 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>​
  
Line 1085: Line 1228:
 //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>​
  
Line 1091: Line 1235:
  
 //​asEntityName //- internal name\\ //​asEntityName //- internal name\\
-//​asEntityFile //- entity to be used   ​extension .ent\\+//​asEntityFile //- entity to be used extension .ent\\
 //​asAreaName //- the area to create the entity at\\ //​asAreaName //- the area to create the entity at\\
 //​abFullGameSave //- determines whether an entity "​remembers"​ its state //​abFullGameSave //- determines whether an entity "​remembers"​ its state
-<code c>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 1106: Line 1251:
 //​asNewEntityFile//​ - Name of the new entity file. Extension .ent.\\ //​asNewEntityFile//​ - Name of the new entity file. Extension .ent.\\
 //​abFullGameSave//​ - Whether ALL properties of this entity should be saved throughout levels. //​abFullGameSave//​ - Whether ALL properties of this entity should be saved throughout levels.
-<code c++>void PlaceEntityAtEntity(string &in asName, string &in asTargetEntity,​ string &in asTargetBodyName,​ bool abUseRotation);​+<code c++> 
 +void PlaceEntityAtEntity(string &in asName, string &in asTargetEntity,​ string &in asTargetBodyName,​ bool abUseRotation);​
 </​code>​ </​code>​
  
Line 1117: Line 1263:
 //​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).\\ //​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. //​abUseRotation//​ - Whether the entity should be rotated like the target entity.
-<code c>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 1128: Line 1275:
 //afY// - Y co-ordinate position.\\ //afY// - Y co-ordinate position.\\
 //afZ// - Z co-ordinate position. //afZ// - Z co-ordinate position.
-<code c>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 1138: Line 1286:
  
 //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>​
  
Line 1148: Line 1297:
 //​asCallback //- function to call\\ //​asCallback //- function to call\\
 //​abRemoveWhenLookedAt //- determines whether the callback should be removed when the player looked at the entity //​abRemoveWhenLookedAt //- determines whether the callback should be removed when the player looked at the entity
-<code c>void SetEntityPlayerInteractCallback(string&​ asName, string& asCallback, bool abRemoveOnInteraction);​+<code c> 
 +void SetEntityPlayerInteractCallback(string&​ asName, string& asCallback, bool abRemoveOnInteraction);​
 </​code>​ </​code>​
  
Line 1157: Line 1307:
 //​asCallback //- function to call\\ //​asCallback //- function to call\\
 //​abRemoveOnInteraction //- determines whether the callback should be removed when the player interacts with the entity //​abRemoveOnInteraction //- determines whether the callback should be removed when the player interacts with the entity
-<code c>void SetEntityCallbackFunc(string&​ asName, string& asCallback);​+<code c> 
 +void SetEntityCallbackFunc(string&​ asName, string& asCallback);​
 </​code>​ </​code>​
  
Line 1164: Line 1315:
 Type depends on entity type and includes: "​OnPickup",​ "​Break",​ "​OnIgnite",​ etc 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>​
  
Line 1171: Line 1323:
 alState: -1 = off, 0 = between, 1 = on 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>​
  
Line 1193: Line 1348:
 //​abDeleteOnCollide //- determines whether the callback after it was called\\ //​abDeleteOnCollide //- determines whether the callback after it was called\\
 //alStates //- 1 = only enter, -1 = only leave, 0 = both //alStates //- 1 = only enter, -1 = only leave, 0 = both
-<code c>void RemoveEntityCollideCallback(string&​ asParentName,​ string& asChildName);​+<code c> 
 +void RemoveEntityCollideCallback(string&​ asParentName,​ string& asChildName);​
 </​code>​ </​code>​
  
Line 1202: Line 1358:
  
 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 1211: Line 1369:
 //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 1222: Line 1381:
 === 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>​
  
Line 1235: Line 1396:
 //abActive //- nothing to add\\ //abActive //- nothing to add\\
 //​afFadeTime //- time in seconds until prop fully fades //​afFadeTime //- time in seconds until prop fully fades
-<code c>void SetPropStaticPhysics(string&​ asName, bool abX);+<code c> 
 +void SetPropStaticPhysics(string&​ asName, bool abX);
 </​code>​ </​code>​
  
Line 1246: Line 1408:
 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>​
  
Line 1258: Line 1421:
 //afAxisZ //- rotation around Z axis\\ //afAxisZ //- rotation around Z axis\\
 //​abResetSpeed //- determines whether the speed is resetted after goal speed is reached\\ //​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!+//​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!
 <​code>​ <​code>​
 void StopPropMovement(string&​ asName); void StopPropMovement(string&​ asName);
Line 1271: Line 1434:
 Attaches a prop to another prop. Attaches a prop to another prop.
  
-a//​sPropName //- 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\\ //​asAttachName //- internal name of the prop that gets attached\\
-//​asAttachFile //- the prop that gets attached ​  ​extension .ent\\+//​asAttachFile //- the prop that gets attached extension .ent\\
 //afPosX //- X position of the attach from the prop\\ //afPosX //- X position of the attach from the prop\\
 //afPosY //- Y position of the attach from the prop\\ //afPosY //- Y position of the attach from the prop\\
Line 1279: Line 1442:
 //afRotX //- rotation around X axis of the attach\\ //afRotX //- rotation around X axis of the attach\\
 //afRotY //- rotation around Y 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!+//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:\\
Line 1295: Line 1458:
 //​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\\ //​asAttachName //- internal name of the prop that gets attached\\
-//​asAttachFile //- the prop that gets attached ​  ​extension .ent\\+//​asAttachFile //- the prop that gets attached extension .ent\\
 //afPosX //- X position of the attach from the prop\\ //afPosX //- X position of the attach from the prop\\
 //afPosY //- Y position of the attach from the prop\\ //afPosY //- Y position of the attach from the prop\\
Line 1301: Line 1464:
 //afRotX //- rotation around X axis of the attach\\ //afRotX //- rotation around X axis of the attach\\
 //afRotY //- rotation around Y 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!+//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>​
 void RemoveAttachedPropFromProp(string&​ asPropName, string& asAttachName);​ void RemoveAttachedPropFromProp(string&​ asPropName, string& asAttachName);​
Line 1310: Line 1473:
 <​code>​ <​code>​
 void SetPropHealth(string&​ asName, float afHealth); void SetPropHealth(string&​ asName, float afHealth);
-</​code>​ 
- 
-<​code>​ 
 void AddPropHealth(string&​ asName, float afHealth); void AddPropHealth(string&​ asName, float afHealth);
-</​code>​ 
- 
-<​code>​ 
 float GetPropHealth(string&​ asName); float GetPropHealth(string&​ asName);
 </​code>​ </​code>​
Line 1347: Line 1504:
 </​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.  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).+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).
  
 //asName //- the object to push; for bodies, use this format: "//​entityName//​_//​bodyName//"​\\ //asName //- the object to push; for bodies, use this format: "//​entityName//​_//​bodyName//"​\\
Line 1353: Line 1510:
 //afY //- magnitude along the Y-axis\\ //afY //- magnitude along the Y-axis\\
 //afZ //- magnitude along the Z-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.+//​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 ===
  
Line 1399: Line 1556:
 <​code>​ <​code>​
 void SetSwingDoorLocked(string&​ asName, bool abLocked, bool abEffects); void SetSwingDoorLocked(string&​ asName, bool abLocked, bool abEffects);
-</​code>​ 
- 
-<​code>​ 
 void SetSwingDoorClosed(string&​ asName, bool abClosed, bool abEffects); void SetSwingDoorClosed(string&​ asName, bool abClosed, bool abEffects);
 </​code>​ </​code>​
Line 1409: Line 1563:
 <​code>​ <​code>​
 bool GetSwingDoorLocked(string&​ asName); bool GetSwingDoorLocked(string&​ asName);
-</​code>​ 
- 
-<​code>​ 
 bool GetSwingDoorClosed(string&​ asName); bool GetSwingDoorClosed(string&​ asName);
 </​code>​ </​code>​
Line 1475: Line 1626:
 <​code>​ <​code>​
 void SetPropObjectStuckState(string&​ asName, int alState); void SetPropObjectStuckState(string&​ asName, int alState);
-</​code>​ 
- 
-<​code>​ 
 void SetWheelStuckState(string&​ asName, int alState, bool abEffects); void SetWheelStuckState(string&​ asName, int alState, bool abEffects);
-</​code>​ 
- 
-<​code>​ 
 void SetLeverStuckState(string&​ asName, int alState, bool abEffects); void SetLeverStuckState(string&​ asName, int alState, bool abEffects);
 </​code>​ </​code>​
Line 1501: Line 1646:
 <​code>​ <​code>​
 void SetWheelInteractionDisablesStuck(string&​ asName, bool abX); void SetWheelInteractionDisablesStuck(string&​ asName, bool abX);
-</​code>​ 
- 
-<​code>​ 
 void SetLeverInteractionDisablesStuck(string&​ asName, bool abX); void SetLeverInteractionDisablesStuck(string&​ asName, bool abX);
 </​code>​ </​code>​
Line 1542: Line 1684:
 <​code>​ <​code>​
 void AttachPropToStickyArea(string&​ asAreaName, string& asProp); void AttachPropToStickyArea(string&​ asAreaName, string& asProp);
-</​code>​ 
- 
-<​code>​ 
 void AttachBodyToStickyArea(string&​ asAreaName, string& asBody); void AttachBodyToStickyArea(string&​ asAreaName, string& asBody);
 </​code>​ </​code>​
Line 1644: Line 1783:
 //​asEnemyName //- Internal name of the enemy\\ //​asEnemyName //- Internal name of the enemy\\
 //​asNodeName //- Internal name of the node to teleport to\\ //​asNodeName //- Internal name of the node to teleport to\\
-//abChangeY //- Wether ​the Y position of the node will be used when teleporting the enemy+//abChangeY //- Whether ​the Y position of the node will be used when teleporting the enemy
 <​code>​ <​code>​
 void TeleportEnemyToEntity(string &in asEnemyName,​ string &in asTargetEntity,​ string &in asTargetBody,​ bool abChangeY); void TeleportEnemyToEntity(string &in asEnemyName,​ string &in asTargetEntity,​ string &in asTargetBody,​ bool abChangeY);
Line 1656: Line 1795:
 //​asTargetEntity //- Internal name of the entity to teleport to\\ //​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)\\ //​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 //- Wether ​the Y position of the node will be used when teleporting the enemy +//abChangeY //- Whether ​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>​
  
Line 1666: Line 1806:
 //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>​
  
Line 1707: Line 1851:
 :!: **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.1417769401.txt.gz · Last modified: 2014/12/05 08:50 by mudbill