The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
I need help with my Custom Story fast! - by Aquatric - 12-27-2012, 01:16 PM



Users browsing this thread: 2 Guest(s)