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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Key and door problem
TheMadmaxster Offline
Junior Member

Posts: 18
Threads: 7
Joined: Jan 2012
Reputation: 0
#3
RE: Key and door problem

(01-01-2012, 04:42 AM)flamez3 Wrote:
(01-01-2012, 04:25 AM)TheMadmaxster Wrote: Alright, This is my .hps file
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
}

void MyFunc(string &in asItemA, string &in asItemB)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem(key_1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

This is my .lang file (Ignore the note part)




Hope you enjoy!


Study Door Key
A key for the Study.


Dear Floreze
Dear Floreze,[br] You are truely crazy! I can't belive you. You Take our family rug then try to escape the house![br]Well, now you will pay! I've sent my servents to get you, the dead ones.[br]I may not finish this note, but if I find you I will-


Stop!
Stop!,[br] You can't go in that door, I see you right now! I'm locking the door.[br]I've hidden the key somewhere try finding it now![br]Muahahaha!


Everytime I try to pull up the map it says:
(12,14) ERR: 'key_1' is not declared. How do I fix?


So I need to change MyFunc to UsedKeyOnDoor?

01-01-2012, 04:46 AM
Find


Messages In This Thread
Key and door problem - by TheMadmaxster - 01-01-2012, 04:25 AM
RE: Key and door problem - by flamez3 - 01-01-2012, 04:42 AM
RE: Key and door problem - by TheMadmaxster - 01-01-2012, 04:46 AM
RE: Key and door problem - by flamez3 - 01-01-2012, 04:51 AM
RE: Key and door problem - by TheMadmaxster - 01-01-2012, 04:57 AM
RE: Key and door problem - by flamez3 - 01-01-2012, 05:47 AM
RE: Key and door problem - by TheMadmaxster - 01-01-2012, 06:30 AM
RE: Key and door problem - by flamez3 - 01-01-2012, 08:32 AM
RE: Key and door problem - by TheMadmaxster - 01-01-2012, 06:35 PM



Users browsing this thread: 2 Guest(s)