Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
opening door
Author Message
savior10946 Offline
Junior Member

Posts: 8
Joined: Mar 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,176
Joined: Mar 2011
Reputation: 56
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)