FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to make a door open ajar?
(02-13-2013, 05:02 PM)NaxEla Wrote: (02-13-2013, 12:41 PM)BeeKayK Wrote: Oh i used a script like this once.
What happened in the script was basically a timer that kept pushing the door a little bit, a certain amount of time. Like this:
void TimerPushDoor(string &in asTimer)
{
if(GetLocalVarInt("PushDoorVar") == 10)
{
return;
}
AddLocalVarInt("PushDoorVar", 1);
AddPropImpulse("Door", 0, 0, 0.5f, "World");
AddTimer("TimerPushDoor", 0.2, "TimerPushDoor");
}
This is what I've used, too. It's actually how Frictional Games does it in the first map of TDD.
Exactly
Trying is the first step to success.
|
|
02-13-2013, 05:16 PM |
|