(05-01-2013, 01:12 PM)DeAngelo Wrote: This is probably a dumb question, but are you sure that your door is a level door and not just a regular swing door? Barring that, it may be best to just upload your level in a zip so that someone can take a look hands on at the level and the HPS file.
Right, so I went over it. I was using the wrong scripts to unlock a swing door, but now I have another problem.
Whenever I try to load my custom story, this error comes up;
FATAL ERROR: Could not load script file 'custom_stories/Razors/maps/01_Motel.hps'!
main (20, 2) : ERR : Unexpected end of file
My HPS FILE:
void OnStart()
{
AddUseItemCallback("", "Key1", "masion_Door", "FUNCTION", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("masion_Door", false);
PlaySoundAtEntity("unlock_door.snt", unlock_door", asEntity, 100, false);
RemoveItem("item");
}
(05-01-2013, 01:19 PM)DeAngelo Wrote: (05-01-2013, 01:17 PM)Kullin Wrote: You Should not have the function on the void on leave section, both Should be on void on start
1: he doesn't have it in his onleave section
2: If he put it in the OnStart section, it would unlock the door the moment he starts the map, not when he uses the key.
THANK YOU SO MUCH!!
It finally works! I have my key name, key desc, my description and the key unlocks the door! Thank you!