The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#1
Locking Doors ,Give Item ,and Lights

I'm trying to make a script where the player can lock and unlock the same door. But when I lock it, it doesn't lock the door. Here's my script :
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""key_study""mansion_1""UseKeyOnDoor01"true);
}
void UseKeyOnDoor01(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("mansion_1"falsetrue);
PlaySoundAtEntity("""unlock_door.snt""mansion_1"0.0ftrue);
AddUseItemCallback("""key_study""mansion_1""LockDoor01"true);
}

void LockDoor01(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("mansion_1"falsetrue);
PlaySoundAtEntity("""lock_door.snt""mansion_1"0true);
AddUseItemCallback("""key_study""mansion_1""UseKeyOnDoor01"true);

When I give the study key using the "GiveItem" Script, the picture on the inventory is like this :
[Image: amnesia2013012216031325.jpg]

And I want to make a script where the player can interact with a candle to turn it off if it's lit. I've searched on the engine scripts and I didn't found anything about turning off candles.

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 01-22-2013, 10:17 AM by No Author.)
01-22-2013, 10:15 AM
Find


Messages In This Thread
Locking Doors ,Give Item ,and Lights - by No Author - 01-22-2013, 10:15 AM



Users browsing this thread: 2 Guest(s)