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
Can't make an unlockable door
1402News Offline
Junior Member

Posts: 4
Threads: 1
Joined: Jan 2018
Reputation: 0
#3
RE: Can't make an unlockable door

(01-22-2018, 06:17 PM)Romulator Wrote: You need to rename your FUNCTION parameter to match the one in your UseItem Callback. In this case, you need to name your function like this:

PHP Code: (Select All)
void UseKeyOnCSBedroomDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity0false);
RemoveItem(asItem);


Provided your key and door names are correct in your map, then this script should work correctly now. Smile

So in other words, remove the FUNCTION part?

(01-23-2018, 01:13 AM)1402News Wrote:
(01-22-2018, 06:17 PM)Romulator Wrote: You need to rename your FUNCTION parameter to match the one in your UseItem Callback. In this case, you need to name your function like this:

PHP Code: (Select All)
void UseKeyOnCSBedroomDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked(asEntityfalsetrue);
PlaySoundAtEntity("""unlock_door"asEntity0false);
RemoveItem(asItem);


Provided your key and door names are correct in your map, then this script should work correctly now. Smile

So in other words, remove the FUNCTION part?

Actually, I've tried it with the function saying FUNCTION and the door still wouldn't unlock.
(This post was last modified: 01-23-2018, 01:21 AM by 1402News.)
01-23-2018, 01:13 AM
Find


Messages In This Thread
Can't make an unlockable door - by 1402News - 01-22-2018, 06:55 AM
RE: Can't make an unlockable door - by Romulator - 01-22-2018, 06:17 PM
RE: Can't make an unlockable door - by 1402News - 01-23-2018, 01:13 AM
RE: Can't make an unlockable door - by 1402News - 01-23-2018, 04:27 PM
RE: Can't make an unlockable door - by Neelke - 01-26-2018, 11:45 AM
RE: Can't make an unlockable door - by Mudbill - 01-24-2018, 10:29 PM
RE: Can't make an unlockable door - by Mudbill - 01-27-2018, 01:12 AM



Users browsing this thread: 1 Guest(s)