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
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


Messages In This Thread
Need help with a scripting problem - by Khan - 08-15-2011, 01:46 AM



Users browsing this thread: 1 Guest(s)