Frictional Games Forum (read-only)
An annoying script problem. - Printable Version

+- Frictional Games Forum (read-only) (
+-- Forum: Amnesia: The Dark Descent (
+--- Forum: Custom Stories, TCs & Mods - Development (
+---- Forum: Development Support (
+---- Thread: An annoying script problem. (/thread-24982.html)

An annoying script problem. - Slanderous - 04-02-2014

Hey everyone,

I'm working on a script file to my map, the problem is I want to make a script that if player tries to open the locked door, he hears ghostly sounds and gets an instant sanity damage, but for some reason this doesn't work. The function also adds a timer which is 7 second, and after it, the door should open, but it does not as well. I added debug messages and they do not show up in-game. Anyone knows the solution?

The "not-working" part of my .hps file

PHP Code:
void Func_StartMadness(string &in entity)
GetSwingDoorLocked("hub_1") == true)
AddDebugMessage("Feel the wrath of Shao Kahn!"false);

void TriggerOpenDoorFunc(string &in asTimer)
AddDebugMessage("Feel the power of Shao Kahn!"false);

ofc the door names in the notepad and level editor are the same. Any help will be appreciated.

EDIT: nvmd, I fixed it. This thread may be closed now.

RE: An annoying script problem. - Wapez - 04-02-2014

How are you calling the function?

RE: An annoying script problem. - Slanderous - 04-02-2014

(04-02-2014, 07:51 PM)Wapez Wrote: How are you calling the function?

I already fixed it - I forgot to add a line to PlayerInteractCallback in Level editor.