Hey Guys just want a bit of help with the HPS file
Ive programmed a key to unlock a door so far and now i want to trigger that door to close again behind me once i get through the door. I know the scripts but do i add those scripts to the same HPS or another one? also if its same one could you show me how to set one up?
Sorry im new heres what ive got so far...
////////////////////
// Run First time Starting map
void OnStart()
{
AddUseItemCallback("", "Awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("Awesomekey_1");
}
{
AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 1);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
void SetSwingDoorClosed("mansion_1", true, true);
}