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


Poll: Isnt this problem such a bitch!?
You do not have permission to vote in this poll.
YES IT'S SOO ANNOYING
100.00%
3 100.00%
nah, I don't make custom stories
0%
0 0%
Total 3 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia custom story .hps file problem HELP ASAP
Dynomite33 Offline
Junior Member

Posts: 18
Threads: 5
Joined: Dec 2011
Reputation: 0
#5
RE: Amnesia custom story .hps file problem HELP ASAP

(12-30-2011, 03:20 PM)Apjjm Wrote: You have a semi-colon at the end of "void UsedKeyOnDoor(string &in asItem, string &in as Entity)". Also you have "as Entity" instead of "asEntity". The following should work:
void OnStart()
{
AddUseItemCallback("", "BedroomKey_1", "bedroom_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroom_1", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroom_1", 0, false);
RemoveItem("BedroomKey_1");
}

Edit: Code formatting fixed.
my door doesnt work now :/
EDIT:
the key works on the door, but the door isnt locked to start with
my .hps

void OnStart()
{
AddUseItemCallback("", "bedroomkey_1", "bedroom_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroom_1", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroom_1", 0, false);
RemoveItem("bedroomkey_1");
}

void OnEnter()
{
}

void OnLeave()
{
}



If life gives you lemons, give them back and demand chocolate
snf*~scoutillite
(This post was last modified: 12-30-2011, 04:36 PM by Dynomite33.)
12-30-2011, 04:24 PM
Find


Messages In This Thread
RE: Amnesia custom story .hps file problem HELP ASAP - by Dynomite33 - 12-30-2011, 04:24 PM



Users browsing this thread: 1 Guest(s)