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
Last revision Both sides next revision
hpl2:amnesia:script_functions [2016/08/26 18:39]
newsmanwaterpaper
hpl2:amnesia:script_functions [2019/09/19 17:41]
darkfire [Debugging]
Line 74: Line 74:
 :!: **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.
Line 83: Line 83:
 :!: **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 92: 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.
Line 226: Line 226:
 </​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);​
Line 240: Line 239:
 </​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).\\ 
 +\\ 
 +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 402: Line 406:
 </​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\\
Line 698: Line 702:
 </​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++> <code c++>
Line 761: 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 ====
hpl2/amnesia/script_functions.txt · Last modified: 2019/09/19 17:44 by darkfire