(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.