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
#7
RE: HELP ME! My scripting seems right but doesn't work. Please Help.

(03-28-2012, 05:44 PM)SilentStriker Wrote: Name the key firstdoorkey on both the name and the customsubitemtypename
I made some changes to the scripts:


<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_Key1">Unlocks The Locked Door</Entry>
<Entry Name="ItemName_Key1">Key To Locked Door</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_01_Name">Welcome.</Entry>
<Entry Name="Note_01_Text">You shall die...</Entry>
</CATEGORY>
</LANGUAGE>
_________________________________________________________________________________


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

//===========================================
// This runs when the map first starts
void OnStart()
{
AddUseItemCallback("", "Key1", "Door1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(Door1, false, true);
PlaySoundAtEntity("", "unlock_door", Door1, 0, false);
RemoveItem(Key1);
}

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

I have the same name in the customsubitemtypename... When i pick up the key it just says: "Picked up", the door is still unlocked, and the notes is blank. I'm thinking it might be something else, not the scripts.

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, 06:06 PM by Wapez.)
03-28-2012, 06:06 PM
Find


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



Users browsing this thread: 2 Guest(s)