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 Key Unlock Door script won't work :(
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#1
Key Unlock Door script won't work :(

Hello everyone, i am new here on this forum an i need some help with my script.
PS: If this thread is on the wrong board then just move it and i know this is a common problem

i want my key to unlock "the door", But as everyone else i get "could't not use item this way" i think its called, I have checked many tutorials and read some threads here on the forum and tried their way, but it wont work =(

Here's my script:

void OnStart()
{
AddUseItemCallback("", "basementkey_1", "basementdoor_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door","basementdoor_1", 0.0f, false);
RemoveItem(basementkey_1);
}


Now, if you find whats wrong or if there are some errors then please help me, That would mean alot
i have checked so the names are the same and so, and i also tried to change the names of the door and key and see if that worked, but no positive feedback i got from it Sad

sorry for my bad english, i get nervous when writing in english :O
10-08-2012, 10:00 PM
Find


Messages In This Thread
Key Unlock Door script won't work :( - by Rowzter - 10-08-2012, 10:00 PM



Users browsing this thread: 1 Guest(s)