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
Leveldoor lock doesn't work properly
Lukaboy8 Offline
Junior Member

Posts: 25
Threads: 10
Joined: Aug 2012
Reputation: 0
#1
Leveldoor lock doesn't work properly

Hello everybody,

I have a key called Bedroomkey and a leveldoor called Bedroomlevel. Now I have this script:

PHP Code: (Select All)
void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
 
SetSwingDoorLocked("Bedroomlevel"falsetrue);
 
PlaySoundAtEntity("""unlock_door""Bedroomlevel"0false);
 
RemoveItem("Bedroomkey");


I can here the unlock_door sound and the Bedroomkey is gone from my inventory but the door is not unlocked :/ How can I fix this?

Luke
08-05-2012, 05:05 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: Leveldoor lock doesn't work properly

You need SetLevelDoorLocked for level doors Wink

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Bedroomlevel", false);
PlaySoundAtEntity("", "unlock_door", "Bedroomlevel", 0, false);
RemoveItem("Bedroomkey");
}

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 08-05-2012, 05:14 PM by Steve.)
08-05-2012, 05:12 PM
Find
Lukaboy8 Offline
Junior Member

Posts: 25
Threads: 10
Joined: Aug 2012
Reputation: 0
#3
RE: Leveldoor lock doesn't work properly

Thanks didn't know about thatWink
08-05-2012, 05:13 PM
Find




Users browsing this thread: 4 Guest(s)