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
On Pickup help
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#1
On Pickup help

Hello. I want to make something in my level that when you pick up a lantern, a locked door blocking the path is unlocked. Like in the second level of Amnesia. You cannot continue until you pick up the lantern. Can someone help me?
10-22-2010, 03:19 PM
Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#2
RE: On Pickup help

(10-22-2010, 03:19 PM)house Wrote: Hello. I want to make something in my level that when you pick up a lantern, a locked door blocking the path is unlocked. Like in the second level of Amnesia. You cannot continue until you pick up the lantern. Can someone help me?

In the lantern's Entity properties, type (for example) "PickLanternUnlockDoor" (without the quotes) into the "CallbackFunc" field.
Then, in your mapname.hps file, do something like this:
void PickLanternUnlockDoor(string &in EntityName, string &in Type)
{
if(Type == "OnPickup") {
SetSwingDoorLocked("door_name", false, true);
}
}
Of course you have to replace door_name with the entity name of your door.
10-22-2010, 03:25 PM
Find
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#3
RE: On Pickup help

(10-22-2010, 03:25 PM)ThePaSch Wrote:
(10-22-2010, 03:19 PM)house Wrote: Hello. I want to make something in my level that when you pick up a lantern, a locked door blocking the path is unlocked. Like in the second level of Amnesia. You cannot continue until you pick up the lantern. Can someone help me?

In the lantern's Entity properties, type (for example) "PickLanternUnlockDoor" (without the quotes) into the "CallbackFunc" field.
Then, in your mapname.hps file, do something like this:
void PickLanternUnlockDoor(string &in EntityName, string &in Type)
{
if(Type == "OnPickup") {
SetSwingDoorLocked("door_name", false, true);
}
}
Of course you have to replace door_name with the entity name of your door.

Thank you! It works now! Thank you a lot!
10-22-2010, 06:56 PM
Find
Hyperoom Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2017
Reputation: 0
#4
RE: On Pickup help

(10-22-2010, 03:25 PM)ThePaSch Wrote:
(10-22-2010, 03:19 PM)house Wrote: Hello. I want to make something in my level that when you pick up a lantern, a locked door blocking the path is unlocked. Like in the second level of Amnesia. You cannot continue until you pick up the lantern. Can someone help me?

In the lantern's Entity properties, type (for example) "PickLanternUnlockDoor" (without the quotes) into the "CallbackFunc" field.
Then, in your mapname.hps file, do something like this:
void PickLanternUnlockDoor(string &in EntityName, string &in Type)
{
if(Type == "OnPickup") {
SetSwingDoorLocked("door_name", false, true);
}
}
Of course you have to replace door_name with the entity name of your door.
Did I do something wrong since the whole game crashes when I try to start the custom story?
(This post was last modified: 06-20-2017, 02:43 PM by Hyperoom.)
06-20-2017, 02:41 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: On Pickup help

(06-20-2017, 02:41 PM)Hyperoom Wrote: Did I do something wrong since the whole game crashes when I try to start the custom story?

Hello there Hyperoom. If you have a look at the timecode of the post you have replied to, you should notice that that post was from 2010. The users who have posted this thread have moved on, and are unlikely to help you with you problems.

It is recommended you start a new thread in the Development Support subforum, outlining your problem and, if possible, the script which may be causing problems.

Closing this thread.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
06-20-2017, 03:39 PM
Find




Users browsing this thread: 2 Guest(s)