Quote:void SetLanternLitCallback(string& asCallback);
Sets the function to call when the player uses his lantern.
Callback syntax:
MyFunc(bool abLit)
If you would like for them to run out of fuel:
Quote: void SetPlayerLampOil(float afOil);
Use this to set the oil to
0.0f.
Also, use this to create a breaking sound:
Quote:void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
Creates a sound on an entity.
asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its
state. If true, the sound is never attached to the entity! Also note
that saving should on be used on looping sounds!
You could use this to prevent the user from using their lamp, even if they have spare oil in their inventory:
void SetLanternDisabled(bool abX);