Door are Simple,All you need is a Door (Of course),a key (
) and a .hps
To open a door with a key,it's simple,name the door first,we'll name it "door_1" and the key "key_1"
Set the Door to Locked
Go to the hps file,open it and type :
void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
RemoveItem(asItem);
}
void OnStart()
{
AddUseItemCallback("useexit", "key_1", "door_1", "UseKey",true);
}
And you're all set !
You can add everything in void Onstart() for example :
GiveItemFromFile("lantern", "lantern.ent");
For giving a lantern to the players,etc...
Yes i used the script of the 30 min editor map,
I hope you will do a great map !
PS : If my english is bad it's because i'm french ^^