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 I need help with my Custom Story fast!
Aquatric Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#1
I need help with my Custom Story fast!

Hello there, community!

I have been into making Custom Stories and I want to make a really serious and a long one. But I got one problem. I want one key are gonna open a specefic swing door. I've watched tutorials and such, checked the "Locked" box in the Level Editor, but I can't make it work.. So, here's my code:

extra.english.lang
Spoiler below!

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are William, the gentleman. You have a weak memory where your location was, in your house. You woke up in a castle and you smell the stinky and dizzy smell.
-I need to escape, fast! I can't be here anymore!</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_PrisonIntro_Name">Read this!</Entry>
<Entry Name="Note_PrisonIntro_Text">If anybody sees this, then you are trapped! There is a shadow, no a monster patrolling in this castle. Watch out for him, if he sees you, escape, or atleast try! I also put a key around here that i made here, get it to unlock the door. Good luck my friend. [br]
</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_key1">This key maybe will lead me out from this stinky prison?</Entry>
<Entry Name="ItemName_key1">Handmade Rusty Key</Entry>
</CATEGORY>
</LANGUAGE>

00_castle.hps my HPS file
Spoiler below!

void OnStart()
{
AddUseItemCallback("", "key1", "castle_arched01_1", "UsedKeyOnDoor", true);
}

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

void OnEnter()
{

}

void OnLeave()
{

}


I'm using Notepad ++, but it won't work. When I am In-Game and picks up the key, it does not say "Handmade Rusty Key" and I can't see the description of it in the inventory. I would love you guys if you could help me, thanks!
12-27-2012, 01:16 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: I need help with my Custom Story fast!

Hmm... if the description works it must be a general problem:

Go to the level editor and click the key. In there, put "key_1" in CustomSubItemName or something like that.
If there are .map_cache, delete them.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-27-2012, 01:28 PM
Find
Aquatric Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#3
RE: I need help with my Custom Story fast!

It did not work, it just says when I pick up the key: "Picked up" then I press tab holding my mouse cursor over the key it's just blank. When I try to unlock the door with the key it says: "Cannot use this item this way!" and how do I see if I have any .map_cache? I only see in my maps folder 00_castle.map and 00_castle.hps
12-27-2012, 01:45 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: I need help with my Custom Story fast!

(12-27-2012, 01:28 PM)The chaser Wrote: Hmm... if the description works it must be a general problem:

Go to the level editor and click the key. There, put "key1" in CustomSubItemName or something like that.
If there are .map_cache, delete them.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-27-2012, 03:04 PM
Find
Aquatric Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#5
RE: I need help with my Custom Story fast!

(12-27-2012, 03:04 PM)The chaser Wrote:
(12-27-2012, 01:28 PM)The chaser Wrote: Hmm... if the description works it must be a general problem:

Go to the level editor and click the key. There, put "key1" in CustomSubItemName or something like that.
If there are .map_cache, delete them.
Hmm..? I just changed it to Key_1 as you said, I had Key1 earlier, both doesn't work, and I cannot find any .map.cache
12-27-2012, 03:08 PM
Find




Users browsing this thread: 1 Guest(s)