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
Closet script need help !!! :)
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#11
RE: Closet script need help !!! :)

KeyOnDoor should work.

For example,

AddUseItemCallback("", "keyname", "closetname", "KeyOnDoor", true);



{
void KeyOnDoor(string &in asItem, string &in asEntity)
SetSwingDoorLocked("closetname", false, true);

PlaySoundAtEntity("", "unlock_door", "closetname", 0, false);
RemoveItem("keyname");
}

I have done this before, KeyOnDoor works, you can name it what you like, but what I have there is what should work.


Hope this explains it better!
(This post was last modified: 08-11-2012, 03:05 AM by TheIcyPickle.)
08-11-2012, 02:50 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#12
RE: Closet script need help !!! :)

It should rather be:

void OnStart()
{
AddUseItemCallback("", "keyname", "closetname", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("closetname", false, true);
PlaySoundAtEntity("", "unlock_door", "closetname", 0, false);
RemoveItem("keyname");
}

[Image: 18694.png]
08-11-2012, 03:44 AM
Find
TheIcyPickle Offline
Member

Posts: 80
Threads: 16
Joined: Feb 2011
Reputation: 0
#13
RE: Closet script need help !!! :)

right, I seem to have a few typos. thanks.
08-11-2012, 04:42 AM
Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#14
RE: Closet script need help !!! :)

Now my lang file(with description and name) to the key won't work, or the other works fine Smile
08-11-2012, 03:37 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#15
RE: Closet script need help !!! :)

(08-11-2012, 03:37 PM)Pandachoko Wrote: Now my lang file(with description and name) to the key won't work, or the other works fine Smile
I could be wrong, but I think you have to have it this way:

<CATEGORY Name="Inventory">
<Entry Name="ItemName_KeyCloset">Double spare key</Entry>

<Entry Name="ItemDesc_KeyCloset">This is a hidden key for a closet in the basement </Entry>

</CATEGORY>
("ItemName_KeyCloset" before "ItemDesc_KeyCloset")
Tell me if it worked.

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
08-11-2012, 03:48 PM
Website Find
Pandachoko Offline
Junior Member

Posts: 47
Threads: 14
Joined: Aug 2012
Reputation: 0
#16
RE: Closet script need help !!! :)

It worked Smile
08-11-2012, 08:47 PM
Find




Users browsing this thread: 1 Guest(s)