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
Script Help 1 working key, 1 unworking
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#1
1 working key, 1 unworking

I have tried alot of things to get the 2nd key to work, but i can't semm to fix it. here is my hps file:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "BedroomKey", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "StorageRoomKey", "mansion_2", "Door", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("BedroomKey");
}
void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveItem("StorageRoomKey");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}
what am I doing wrong?
01-01-2012, 08:33 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: 1 working key, 1 unworking

Where did you put "StorageRoomKey" in the key's tab in the LeveEditor? It could be in the wrong spot or spelled incorrectly...
01-01-2012, 10:27 PM
Find
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#3
RE: 1 working key, 1 unworking

(01-01-2012, 10:27 PM)Statyk Wrote: Where did you put "StorageRoomKey" in the key's tab in the LeveEditor? It could be in the wrong spot or spelled incorrectly...


I put it in the CutomSubItemTypeName
01-01-2012, 11:28 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#4
RE: 1 working key, 1 unworking

I'm not sure if this is it, but put it as the internal name. Where it says something like "item_key_01"
01-02-2012, 12:57 AM
Find
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#5
RE: 1 working key, 1 unworking

FINNALY after many tries. The key works. Big Grin
01-02-2012, 08:42 PM
Find




Users browsing this thread: 2 Guest(s)