Frictional Games Forum (read-only)
do i need a script if i want to lock a chest with padlocks ? - 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: do i need a script if i want to lock a chest with padlocks ? (/thread-25720.html)

Pages: 1 2


do i need a script if i want to lock a chest with padlocks ? - Amnesiaplayer - 07-20-2014

the title is my question Big Grin


RE: do i need a script if i want to lock a chest with padlocks ? - victorkim890(KimmyChimmy) - 07-20-2014





it works for me


RE: do i need a script if i want to lock a chest with padlocks ? - Amnesiaplayer - 07-20-2014

oh :O sorry :S and thankss!!
what must i do ?? can you tell me step for step ? :S


RE: do i need a script if i want to lock a chest with padlocks ? - victorkim890(KimmyChimmy) - 07-20-2014

its rlly easy


RE: do i need a script if i want to lock a chest with padlocks ? - Mudbill - 07-21-2014

Use SetLeverStuckState, because the chest is not considered a door, but rather a lever with an on and off state (open and closed).

PHP Code:
SetLeverStuckState(stringasNameint alStatebool abEffects); 



RE: do i need a script if i want to lock a chest with padlocks ? - victorkim890(KimmyChimmy) - 07-21-2014

it also works with a piano


RE: do i need a script if i want to lock a chest with padlocks ? - Amnesiaplayer - 07-21-2014

oh thanks... but now i got expected ) Sad

PHP Code:
void OnStart()
{
SetLeverStuckState(stringasNameint alStatebool abEffects); 
}


void MoveWall(string &in asEntityint alState
{
    if (
alState == -1)
    {
        
SetMoveObjectState("MoveWall"1);
        
SetLeverStuckState("secretlever", -1false);
        
PlaySoundAtEntity("""quest_completed.snt""MoveWall"0false);
    }




RE: do i need a script if i want to lock a chest with padlocks ? - victorkim890(KimmyChimmy) - 07-21-2014

u hav to fill in the (string& asName, int alState, bool abEffects);


RE: do i need a script if i want to lock a chest with padlocks ? - Amnesiaplayer - 07-21-2014

i forgot this one... what must i type ? my big chest name is Big and my small chest is small ...


RE: do i need a script if i want to lock a chest with padlocks ? - victorkim890(KimmyChimmy) - 07-21-2014





watch this vid if u dont no