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
Script Help Locking Doors ,Give Item ,and Lights
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Locking Doors ,Give Item ,and Lights

For the lock&unlock
void OnStart()
{
AddUseItemCallback("", "key_study", "mansion_1", "UseKeyOnDoor01", false);
}


void UseKeyOnDoor01(string &in asItem, string &in asEntity)
{

if(GetSwingDoorLocked("mansion_1") == true)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "lock_door.snt", "mansion_1", 0, true);
}

if(GetSwingDoorLocked("mansion_1") == false)
{
SetSwingDoorLocked("mansion_1", true, true);
PlaySoundAtEntity("", "lock_door.snt", "mansion_1", 0, true);
}
}

Could you show me your "GiveItem" line?

Trying is the first step to success.
(This post was last modified: 01-22-2013, 11:37 AM by FlawlessHappiness.)
01-22-2013, 11:28 AM
Find


Messages In This Thread
RE: Locking Doors ,Give Item ,and Lights - by FlawlessHappiness - 01-22-2013, 11:28 AM



Users browsing this thread: 1 Guest(s)