Help ! Amnesia Script That Opens Safe Doors

The forums have been archived. Please read this thread for more information.

  • Help ! Amnesia Script That Opens Safe Doors

    Hello people, i need help with a script that opens a safety door "safety_large_vert_1" for example. And when i drag this "lever_small01_1" up or down, doesnt matter. But when i drag it up or down the "safety_large_vert_1" should open by itself. I don't want to UnActive it. The Door should be pushed upwards !
    CLOSED
    OPENED

    Help ? Have no idea to do that script. Sorry for my bad English.
    ! MorFear !
  • void OnStart()
    {
    AddEntityCollideCallback ("lever_small01_1", "OpenSafeDoor", "Opensafedoor", true, 1);
    }

    void Opensafedoor (string &in asParent, string &in asChild, int alState)
    {
    SetMoveObjectState("safety_large_vert_1", 1);
    }

    I dunno how i am supposed to make this work but, if i got "SetMoveObjectState("safety_large_vert_1", 1);" there it stays opened when the map starts. I want it to open when i drag the lever down. OPEN SLOWLY, + the sound of that door. Well from this cs "Tenebris Lake" i have been playing it. But when the safety door opens it comes a sound Don't know that sound effect. Sorry for my bad English to lazy to type everything right.
    ! MorFear !
  • Try this:

    void OnStart()
    {
    AddEntityCollideCallback ("lever_small01_1", "OpenSafeDoor", "Opensafedoor", true, 1);
    SetMoveObjectState("safety_large_vert_1", 0);
    }

    void Opensafedoor (string &in asParent, string &in asChild, int alState)
    {
    SetMoveObjectState("safety_large_vert_1", 1);
    }

    RainPumpedDrakerzz likes this.

  • void OnStart()
    {
    AddEntityCollideCallback ("lever_small01_1", "OpenSafeDoor", "Opensafedoor", true, 1);
    SetMoveObjectState("safety_large_vert_1", 0);
    }

    void Opensafedoor (string &in asParent, string &in asChild, int alState)
    {
    SetMoveObjectState("safety_large_vert_1", 1);
    PlaySoundAtEntity("", "nameofsound.snt", "safety_large_vert_1", 0,false);
    }

    Chanfe the nameofsound.snt to the sound you want. And remember to include the .snt extension



    PPP | FlameX wrote:

    Flamez3 is the forums scripting wizard for amnesia :3