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
Need help with a scripting problem
Khan Offline
Member

Posts: 61
Threads: 12
Joined: Aug 2011
Reputation: 0
#1
Need help with a scripting problem

KK, So Im trying to make a door slam shut, like in the main Amnesia, and I think I got the script right and all that, but everytime I try to start up my Amnesia to check and see if it works it crashes and sais there was a fatal error, wtf Sad


Here's the entire .hps file.


////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "chamberkey", "chamberdoor", "FUNCTION", true);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("chamberdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("chamberkey");
SetSwingDoorClosed("doorslam", true, true);

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorslam", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Can anyone of you fine gentleman see a problem here?
08-15-2011, 01:46 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Need help with a scripting problem

Close your FUNCTION function.

Tutorials: From Noob to Pro
08-15-2011, 02:32 AM
Website Find




Users browsing this thread: 1 Guest(s)