Frictional Games Forum (read-only)
Can I make the the player unable to turn of the lantern? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Can I make the the player unable to turn of the lantern? (/thread-22226.html)



Can I make the the player unable to turn of the lantern? - Kullin - 07-24-2013

Is it possible to make the player unable to turn of the lantern somehow?


RE: Can I make the the player unable to turn of the lantern? - ClayPigeon - 07-24-2013

Not really.
You can only set a callback which'll turn it back on if it turns off.

Code:
void OnStart()
{    
    SetLanternLitCallback("Ununlit");
}

void Ununlit(bool islit)
{    
    if(!islit)    
    {        
        SetLanternActive(true, false);    
    }
}



RE: Can I make the the player unable to turn of the lantern? - The chaser - 07-24-2013

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#player

You should play with these in order to get an always-lantern script:

SetLanternDisabled(bool abX);
bool GetLanternActive();
SetLanternActive(bool abX, bool abUseEffects);


RE: Can I make the the player unable to turn of the lantern? - Kullin - 07-24-2013

Thank you both! I dont want the animations though thats the problem! Smile