Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a door open slowly [SOLVED]
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#6
RE: Making a door open slowly

(02-18-2011, 07:35 AM)jens Wrote: Add SetSwingDoorClosed("cellar_wood01_1", false); //<- look up the exact function incase I rememeber incorrectly

And then change the order of things to be:

SetSwingDoorDisableAutoClose("cellar_wood01_1", false);
SetSwingDoorClosed("cellar_wood01_1", false);
AddPropImpulse("cellar_wood01_1", 0.0f, 0.0f, 0.04f, "");

Alright, I changed the script to:
void DoorOpenTimer(string &in asTimer)
{
    if (GetLocalVarInt("TickX") == 40){
        return;
    }
    else
    SetSwingDoorClosed("cellar_wood01_1", false, true);
    SetSwingDoorDisableAutoClose("cellar_wood01_1", false);

    AddPropImpulse("cellar_wood01_1", 0.0f, 0.0f, -0.04f, "");  //I got negative here as my door opens towards me on the Z axis (which gives a lower value when moving the door towards me.
    
    AddTimer("PushDoor", 0.1f, "DoorOpenTimer");
    AddLocalVarInt("TickX", 1);
}

Now the door bugs up and opens/closes very very little, spamming the open & close sound. I tried adding more PropImpulse to the door, but with no luck.

Edit: I found the problem. I changed:
    SetSwingDoorDisableAutoClose("cellar_wood01_1", false);
to:
    SetSwingDoorDisableAutoClose("cellar_wood01_1", true);
Thanks! Big Grin

Creator of The Dark Treasure.
(This post was last modified: 02-18-2011, 11:24 AM by Linus Ågren.)
02-18-2011, 07:55 AM
Website Find


Messages In This Thread
RE: Making a door open slowly - by Vradcly - 02-18-2011, 12:40 AM
RE: Making a door open slowly - by Acies - 02-18-2011, 03:31 AM
RE: Making a door open slowly - by Linus Ågren - 02-18-2011, 07:32 AM
RE: Making a door open slowly - by jens - 02-18-2011, 07:35 AM
RE: Making a door open slowly - by Linus Ågren - 02-18-2011, 07:55 AM



Users browsing this thread: 1 Guest(s)