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


Thread Closed 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
On Pickup help
Author Message
house Offline
Member

Posts: 195
Joined: Oct 2010
Reputation: 1
Post: #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 all posts by this user
Thread Closed 


Messages In This Thread
On Pickup help - house - 10-22-2010, 03:19 PM
RE: On Pickup help - ThePaSch - 10-22-2010, 03:25 PM
RE: On Pickup help - house - 10-22-2010 06:56 PM
RE: On Pickup help - Hyperoom - 06-20-2017, 02:41 PM
RE: On Pickup help - Romulator - 06-20-2017, 03:39 PM



User(s) browsing this thread: 1 Guest(s)