| Next revision | Previous revision | ||
|
hpl2:tutorials:script:slight_oil_recovery [2013/04/08 06:14] amn created |
hpl2:tutorials:script:slight_oil_recovery [2013/07/26 23:04] (current) amn |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | This is a feature i did for my custom story\\ | + | ====== Slight Oil Recovery ====== |
| - | to help the player continue | + | |
| - | Create the following function in your script file | + | This is a feature i did for my custom story to help the player continue. |
| - | <code> | + | Create the following function in your script file: |
| + | |||
| + | <code php> | ||
| void OilRecovery ( string &in asTimer ) | void OilRecovery ( string &in asTimer ) | ||
| - | { | + | { |
| - | if ( GetLanternActive() == false ) { | + | if ( GetLanternActive() == false ) { AddPlayerLampOil( 0.25 ); } |
| - | AddPlayerLampOil( 0.25 ); } | + | |
| AddTimer ( "", 5, "OilRecovery" ); | AddTimer ( "", 5, "OilRecovery" ); | ||
| } | } | ||
| Line 21: | Line 20: | ||
| - | <code> | + | <code php> |
| - | + | AddTimer ( "", 5, "OilRecovery" ); | |
| - | AddTimer ( "", 5, "OilRecovery" ); | + | |
| </code> | </code> | ||