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
HPS file not doing anything
SetsuPotato Offline
Junior Member

Posts: 6
Threads: 2
Joined: Mar 2015
Reputation: 0
#1
HPS file not doing anything

So I started working on a custom story today. I made a key that is supposed to unlock a door but it doesn't. When I try to use the key on the door, it simply says "Cannot use item this way".
I checked through all my code and it seems right to me. I tried the same thing on another map and it didn't work either.

The HPS file:
_________________________________________________________________
void OnEnter()
{
AddUseItemCallback("", "keystair", "doorstair", "UsedKeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorstair", false, true);
PlaySoundAtEntity("", "unlock_door", "doorstair", 0, false);
RemoveItem("keystair");
}

void OnLeave()
{

}
_________________________________________________________________

Also, keystair= name of key and doorstair= name of door. I checked to make sure that the objects both have the right name and they do.
04-08-2015, 02:45 AM
Find


Messages In This Thread
HPS file not doing anything - by SetsuPotato - 04-08-2015, 02:45 AM
RE: HPS file not doing anything - by 7heDubz - 04-08-2015, 03:24 AM
RE: HPS file not doing anything - by SetsuPotato - 04-08-2015, 01:11 PM



Users browsing this thread: 2 Guest(s)