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]
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#3
RE: Making a door open slowly

nah. I've just made one. Add a timer linked to a propimpulse. something like (this is not correct code, just my general idea from memory):

void PushDoorTimer
{
if getlocalvarint("TickX") == 40)
{
return;
}
else
AddPropImpulse("door", 0.0f, 0.0f, 0.04f, "");
// 0.04f (around this force makes it open slowly regarding the timer)
SetSwingDoorDisableAutoClose("door", false);
AddTimer("PushDoor", 0.1f, "PushDoorTimer");
AddLocalVarInt("TickX", 1);
}

This script will give the door a small push every 0.1 second for a total of 4 seconds. The swingdoordisableautoclose is important, since such small forces wouldn't open the door otherwise. If you are still having trouble I could copy --> paste the script for you tomorrow.

[Image: mZiYnxe.png]


02-18-2011, 03:31 AM
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: 2 Guest(s)