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
HELP ME! My scripting seems right but doesn't work. Please Help.
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#1
HELP ME! My scripting seems right but doesn't work. Please Help.

Hi I would like to know what's wrong with this. The door isn't locked and the key shows up without name and description. Please help.


//===========================================
// Starter's Script File!
//===========================================

//===========================================
// This runs when the map first starts
void OnStart()
{

AddUseItemCallback("", "firstdoorkey1", "firstdoor", "UsedKeyOnDoor", true);

}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("firstdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "firstdoor", 0, false);
RemoveItem("firstdoorkey1");

}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}

This is my .lang file:

<LANGUAGE>
<CATEGORY Name="TutorialStory">
<Entry Name="Description">This is a tutorial story. [br] [br]I hope you like it! Big Grin </Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_firstdoorkey>"Key to First Door"</Entry>
<Entry Name="ItemName_firstdoorkey>First Door Key</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Introduction_Name">Welcome.</Entry>
<Entry Name="Note_Introduction_Text">You shall die...</Entry>
</CATEGORY>
</LANGUAGE>

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
(This post was last modified: 03-28-2012, 04:07 PM by Wapez.)
03-28-2012, 03:12 PM
Find


Messages In This Thread
HELP ME! My scripting seems right but doesn't work. Please Help. - by Wapez - 03-28-2012, 03:12 PM



Users browsing this thread: 1 Guest(s)