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
opening door
savior10946 Offline
Junior Member

Posts: 8
Threads: 7
Joined: Mar 2011
Reputation: 0
#1
opening door

Hey I am trying to make my door called mansion_2 open when i unlock mansion_1.

void OnStart()
{
AddUseItemCallback("", "key_1", "door_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("key_1");
}

what do i need to add to make mansion_2 open once i unlock mansion_1 i dont know prop force or entity moving please help.soz for kinda long script.[/size]
04-12-2011, 02:00 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: opening door

Use SetSwingDoorClosed("mansion_2", false, true); It should make it swing all the way open. If it doesn't work the way you want just add an impulse to the door with the right coordinates.

04-12-2011, 03:43 AM
Find




Users browsing this thread: 1 Guest(s)