Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia editor - Unlocking doors help? [Solved]
Racingcreed Offline
Junior Member

Posts: 39
Threads: 12
Joined: Dec 2012
Reputation: 3
#1
Amnesia editor - Unlocking doors help? [Solved]

I'm having some issues getting a door to unlock. I have the item "Hollow needle" in my level, and I'm trying to get it to unlock a "Prison door". I have named the needle to "Sharp_needle" and the door to "prison_door_01".

For the needle, I have set up the name and description. My hps. file looks like below:

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

{
AddUseItemCallback("", "Sharp_needle", "prison_door_01", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_door_01", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem("Key01");
}

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

}

I don't understand why it won't work. Could anyone shed some light on this please? Thanks Smile

Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B

(This post was last modified: 12-24-2012, 06:32 PM by Racingcreed.)
12-24-2012, 03:21 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#2
RE: Amnesia editor - Unlocking doors help?

Try putting your callback into the OnEnter function.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
12-24-2012, 04:06 PM
Find
Racingcreed Offline
Junior Member

Posts: 39
Threads: 12
Joined: Dec 2012
Reputation: 3
#3
RE: Amnesia editor - Unlocking doors help?

It doesn't work still. I can't figure out why it won't work..

Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B

12-24-2012, 04:50 PM
Find
str4wberrypanic Offline
Member

Posts: 241
Threads: 24
Joined: Jul 2012
Reputation: 8
#4
RE: Amnesia editor - Unlocking doors help?

Are you sure you haven't make any mistake with names in the editor? Like, the " RemoveItem("Key01"); ".
It should be RemoveItem("Sharp_needle");

12-24-2012, 04:59 PM
Find
Racingcreed Offline
Junior Member

Posts: 39
Threads: 12
Joined: Dec 2012
Reputation: 3
#5
RE: Amnesia editor - Unlocking doors help?

I just changed that now, still it gives me the "can not be used in this way" message. I don't understand what I'm doing wrong??

Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B

12-24-2012, 05:07 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Amnesia editor - Unlocking doors help?

Is this: AddUseItemCallback("", "Sharp_needle", "prison_door_01", "FUNCTION", true);
in your void OnStart()

Also do you see that you are using the "Sharp_needle" on the door, but you are removing a key? Don't you think that it should be
AddUseItemCallback("", "Key01", "prison_door_01", "FUNCTION", true);

Trying is the first step to success.
(This post was last modified: 12-24-2012, 05:25 PM by FlawlessHappiness.)
12-24-2012, 05:24 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#7
RE: Amnesia editor - Unlocking doors help?

If you know how to use Devmode, turn on DebugMessages and put this inside of your "FUNCTION" callback.
AddDebugMessage("FUNCTION" has responded. Their must be a error with the code inside" FUNCTION"!, false);
12-24-2012, 05:26 PM
Find
Racingcreed Offline
Junior Member

Posts: 39
Threads: 12
Joined: Dec 2012
Reputation: 3
#8
RE: Amnesia editor - Unlocking doors help?

It's ok, I fixed the issue. The problems was the hps file was actually being shown as a txt. file, a friend helped me sort it out. Thanks for helping guys Smile

Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B

12-24-2012, 05:58 PM
Find




Users browsing this thread: 1 Guest(s)