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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
** SOLVED ** Key Doesn't Unlock Door!
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#14
RE: Key Doesn't Unlock Door!

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

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! Big Grin
(This post was last modified: 05-01-2013, 01:45 PM by FurtherGames.)
05-01-2013, 01:39 PM
Find


Messages In This Thread
RE: Key Doesn't Unlock Door! - by FurtherGames - 05-01-2013, 12:49 PM
RE: Key Doesn't Unlock Door! - by DeAngelo - 05-01-2013, 12:54 PM
RE: Key Doesn't Unlock Door! - by FurtherGames - 05-01-2013, 01:02 PM
RE: Key Doesn't Unlock Door! - by DeAngelo - 05-01-2013, 01:05 PM
RE: Key Doesn't Unlock Door! - by FurtherGames - 05-01-2013, 01:09 PM
RE: Key Doesn't Unlock Door! - by DeAngelo - 05-01-2013, 01:12 PM
RE: Key Doesn't Unlock Door! - by FurtherGames - 05-01-2013, 01:14 PM
RE: Key Doesn't Unlock Door! - by DeAngelo - 05-01-2013, 01:16 PM
RE: Key Doesn't Unlock Door! - by FurtherGames - 05-01-2013, 01:39 PM
RE: Key Doesn't Unlock Door! - by Kullin - 05-01-2013, 01:17 PM
RE: Key Doesn't Unlock Door! - by DeAngelo - 05-01-2013, 01:19 PM



Users browsing this thread: 1 Guest(s)