The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
1 working key, 1 unworking - by irockpeople1 - 01-01-2012, 08:33 PM
RE: 1 working key, 1 unworking - by Statyk - 01-01-2012, 10:27 PM
RE: 1 working key, 1 unworking - by irockpeople1 - 01-01-2012, 11:28 PM
RE: 1 working key, 1 unworking - by Statyk - 01-02-2012, 12:57 AM
RE: 1 working key, 1 unworking - by irockpeople1 - 01-02-2012, 08:42 PM



Users browsing this thread: 1 Guest(s)