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!
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#11
RE: Key Doesn't Unlock Door!

Then you're using the wrong script. Change

SetLevelDoorLocked("masion_Door", false);

to

SetSwingDoorLocked("masion_Door", false, true);

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
05-01-2013, 01:16 PM
Find
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#12
RE: Key Doesn't Unlock Door!

You Should not have the function on the void on leave section, both Should be on void on start Smile
05-01-2013, 01:17 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#13
RE: Key Doesn't Unlock Door!

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

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
05-01-2013, 01:19 PM
Find
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




Users browsing this thread: 1 Guest(s)