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
I need help with a Script
priesta Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#1
Brick  I need help with a Script

hello there people.
As im new to scripting, especially in making levels in amnesia, i watched a lot of
tutorials. and i did take a look at the script functions wiki.

I want to do a totally simple thing. A key that opens a locked door.
I do everything like they do in their tutorials. EVERTHING
But i keep getting this error...
[Image: errorqd.jpg]

Here is my HPS file

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "door_1", "UsedKeyOnDoor", true);
}

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

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


and here is my extra_english.lang

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Hier gehts rund, einer in de Pobbes,(br) (br) einer in the Mund!</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemName_AwesomeKey">Lounge Schlüssel</Entry>
<Entry Name="ItemDesc_AwesomeKey">"Schlüssel zur Lounge"</Entry>
</CATEGORY>
</LANGUAGE>


Please help me guys, im going mad over this simple sh*t
regards, priesta
09-30-2011, 09:35 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: I need help with a Script

Put quotation marks around awesomekey_1. Smile
09-30-2011, 09:42 AM
Find
priesta Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#3
RE: I need help with a Script

(09-30-2011, 09:42 AM)Obliviator27 Wrote: Put quotation marks around awesomekey_1. Smile
uhm... i have quotation marks there? Huh
or do you mean at remove awesomekey?


EDIT: that was the point.... thank you man. rep for you
(This post was last modified: 09-30-2011, 09:48 AM by priesta.)
09-30-2011, 09:44 AM
Find




Users browsing this thread: 1 Guest(s)