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
Get a door to open?
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Get a door to open?

I'm using SetSwingDoorDisableAutoClose and AddPropForce. Like this:

void NAMEOFSCRIPT()

SetSwingDoorDisableAutoClose("DOORNAME", true);
SetSwingDoorClosed("DOORNAME", false, false);

if(GetLocalVarInt("Door") == 8){
Some stuff you want to happen after the door has opened
}
else
{
AddTimer("", 0.15f, "DoorOpenRepeat");
AddPropForce("DOORNAME", 0.0f, 0, 100.0f, "World");
AddLocalVarInt("Door", 1);
}
void DoorOpenRepeat(string &in asTimer)
{
NAMEOFSCRIPT();
}

Quite simple. But I would recommend trying some stuff yourself. Also, the AddPropForce might not be correct so test it until it starts opening.
09-12-2013, 06:44 PM
Find


Messages In This Thread
Get a door to open? - by gruzz - 09-12-2013, 06:32 PM
RE: Get a door to open? - by Neelke - 09-12-2013, 06:44 PM
RE: Get a door to open? - by gruzz - 09-12-2013, 07:00 PM
RE: Get a door to open? - by The chaser - 09-12-2013, 08:09 PM



Users browsing this thread: 1 Guest(s)