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
[SOLVED] Newbie .lang file error
The Shanus Offline
Member

Posts: 134
Threads: 15
Joined: Jun 2012
Reputation: 3
#5
RE: Newbie .lang file error

(06-18-2012, 09:20 PM)FastHunteR Wrote: Might be wrong, but you seem to miss keyroom1 in the script. Also add OnStart().Also, you can just use asEntity and asItem in the UsedKeyOnDoor function. So basically:
void OnStart()
{
}
////////////////////////////
// Run when entering map

void OnEnter()
{
AddUseItemCallback("", "room101key", "room101", "UsedKeyOnDoor", true);
AddUseItemCallback("", "keyroom1", "thedooritopens", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", asEntity, "room101", 0, false);
RemoveItem(asItem);
}
This way, you save the whole function of the other key. And doesn't the true at AddUseItemCallback already destroy the item? No need for RemoveItem, as far as I know. Might want to switch the Callbacks from OnEnter to OnStart, but it depends on what exactly you wanted to do with it.
For the problem itself, those are the only things I noticed, and I might be wrong. Good luck Smile
Well as I said before, the door opens and whatnot, and the key works fine, but when its picked up it says "Picked up" rather than "Picked up EnSuite Room Key". Also, it's name doesn't appear in the inventory, and when the note is picked up in the room it says nothing. Would changing it to that ^ affect the problem? (Forgot to mention, my custom story's description says nothing as of now, which is most annoying.)

[Image: theshanusyoutube.jpg]
(This post was last modified: 06-18-2012, 09:25 PM by The Shanus.)
06-18-2012, 09:24 PM
Find


Messages In This Thread
[SOLVED] Newbie .lang file error - by The Shanus - 06-18-2012, 08:17 PM
RE: Newbie .lang file error - by Statyk - 06-18-2012, 08:34 PM
RE: Newbie .lang file error - by The Shanus - 06-18-2012, 08:40 PM
RE: Newbie .lang file error - by Cruzore - 06-18-2012, 09:20 PM
RE: Newbie .lang file error - by The Shanus - 06-18-2012, 09:24 PM
RE: Newbie .lang file error - by Cruzore - 06-18-2012, 09:35 PM
RE: Newbie .lang file error - by The Shanus - 06-18-2012, 09:41 PM
RE: Newbie .lang file error - by Cruzore - 06-18-2012, 10:22 PM
RE: Newbie .lang file error - by The Shanus - 06-18-2012, 10:36 PM
RE: Newbie .lang file error - by Cruzore - 06-18-2012, 10:40 PM



Users browsing this thread: 3 Guest(s)