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
Key to door Script help
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#8
RE: Key to door Script help

(03-24-2011, 01:02 AM)Russ Money Wrote: I have a similar script for my mod, I'll post it here, maybe it'll help you out.
void OnStart()
{
AddUseItemCallback("hallwaydoorunlocked", "HallwayKey", "sewer_arched_4", "hallwaydoorunlocked", true);
}

void hallwaydoorunlocked(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("sewer_arched_4", false, false);
RemoveItem("HallwayKey");
PlaySoundAtEntity("unlocking", "unlock_door.snt", "Player", 0, false);
}

And the .lang file for this category:
<CATEGORY Name="Inventory">

<Entry Name="ItemName_HallwayKey">Hallway Key</Entry>
<Entry Name="ItemDesc_HallwayKey">A key for the main hall.</Entry>

</CATEGORY>

As for the key you pick up, the name of the entity is "HallwayKey"
and the CustomSubItemTypeName is also "HallwayKey"

All this considered, my custom story is working properly.

edit: Also, I believe having underscores in the item name may not let it read properly, try changing the item name and desc to:

<EntryName="ItemName_awesomekey1">Awesome Key</Entry>
<Entry Name="ItemDesc_awesomekey1">Key to your moms bedroom</Entry>

I just tried your script and none of the things in my extra_english file are showing up now >_>

EDIT: Nevermind, the CustomSubItemTypeName was blank, testing now
Still not working. Here's my script for the key.

<CATEGORY Name="Inventory">

<Entry Name="ItemName_keystudy1">Living Quarters Key</Entry>
<Entry Name="ItemDesc_keystudy1">A key to the living quarters.</Entry>

</CATEGORY>

All the info on my key:

Name: keystudy1
Active: True
CustomSubItemTypeName: keystudy1
(This post was last modified: 03-24-2011, 01:17 AM by Austums.)
03-24-2011, 01:10 AM
Find


Messages In This Thread
Key to door Script help - by ZxBrad - 03-23-2011, 08:01 PM
RE: Key to door Script help - by palistov - 03-23-2011, 08:23 PM
RE: Key to door Script help - by ZxBrad - 03-23-2011, 08:29 PM
RE: Key to door Script help - by Viperdream - 03-23-2011, 08:58 PM
RE: Key to door Script help - by ZxBrad - 03-23-2011, 09:12 PM
RE: Key to door Script help - by MrBigzy - 03-23-2011, 09:51 PM
RE: Key to door Script help - by Russ Money - 03-24-2011, 01:02 AM
RE: Key to door Script help - by Austums - 03-24-2011, 01:10 AM
RE: Key to door Script help - by Russ Money - 03-24-2011, 01:22 AM
RE: Key to door Script help - by Austums - 03-24-2011, 01:23 AM
RE: Key to door Script help - by Pandemoneus - 03-24-2011, 01:34 AM
RE: Key to door Script help - by Austums - 03-24-2011, 01:35 AM
RE: Key to door Script help - by Russ Money - 03-24-2011, 02:00 AM



Users browsing this thread: 1 Guest(s)