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
Key Name Problem
TheMadmaxster Offline
Junior Member

Posts: 18
Threads: 7
Joined: Jan 2012
Reputation: 0
#1
Key Name Problem

Hi all,
I am working on another amnesia custom map and I encountered a problem with a key. I copied this line of code from a working map I had made in the past and it is being screwy. It calls "key1" the default "Machine Room Key". Then "key2" just says, "Picked up ". Take a look and let me know.

This is my .lang file

You are David. The world is your ally. Things have gone good for you in the past. The only bad thing is your mind. You have gone insane, you have wondered into the forest and know not of the way back.
    
    
        The Tag Reads: "THEY WILL COME, BE CAREFUL"
        The Unknown Door Key
        What's in the attic?
        Attic Key
    
    
         Why would I lock this door? I hope I'm not getting amnesia like my friend!
        It seems I have been wondering. I must find a lantern!
        Dear Daniel,
        Dear Daniel, [br] My dear friend I know your amnesia is getting worse, but I am completely going insane. The sky, it has no color. Just a black void. I have been seeing things also. Please friend, come and help me. [br] From, [br] David

This is my .hps file
void OnStart()
{
    AddEntityCollideCallback("Player", "Mem1", "AddQuest1", true, 1);
    AddUseItemCallback ("", "key1", "door1", "FUNCTION", true);
    SetEntityCallbackFunc ("key1,", "OnPickup");
}

void FUNCTION (string &in key1, string & in door1)
{
    SetSwingDoorLocked (door1, false, true);
    PlaySoundAtEntity ("", "unlock_door", door1, 0, false);
    RemoveItem (key1);
}

void AddQuest1(string &in asParent, string &in asChild, int alState)
{
    AddQuest("lockeddoor", "LockedDoor");
}

void OnLeave()
{

}

void OnEnter()
{

}
(This post was last modified: 10-10-2012, 06:22 PM by TheMadmaxster.)
10-10-2012, 02:41 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Key Name Problem

I am willing to be that this is a level editor issue. You .lang seems fine, and the .hps file has no effect on the problem you're having.

In the level editor, make sure the name you're using in the lang (i.e. key1) is not the name of the actual key; make sure it is the name in:

entity tab>CustomSubItemTypeName (at the bottom).

If that is not the issue, then I will do my best to find a new solution Big Grin

I rate it 3 memes.
10-10-2012, 03:00 AM
Find
TheMadmaxster Offline
Junior Member

Posts: 18
Threads: 7
Joined: Jan 2012
Reputation: 0
#3
RE: Key Name Problem

(10-10-2012, 03:00 AM)andyrockin123 Wrote: Thanks soooo much. I completely missed that! Thanks.
Also Im going to PM you so watch that!
10-10-2012, 03:07 AM
Find




Users browsing this thread: 1 Guest(s)