Frictional Games Forum (read-only)
DOOR PROBLEM.. >:o - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: DOOR PROBLEM.. >:o (/thread-13104.html)

Pages: 1 2 3


DOOR PROBLEM.. >:o - MicroDude - 02-04-2012



THE PROBLEM WAS THAT MY SCRIPT DID NOT WORK...

The solution was to rename my 2 files (.hps and .map) into the correct ones as they had diffrent names. So what i did was to rename A gentlemans dream to A_Gentlemans_Dream









Okay so basically i cant get a door to close on a trigger/area..

I am going to provide all the things that you guys could need.. I guess its just something easy
as pie.. Anyways lets get started ..

HERE IS MY PROBLEM INGAME U WILL PROBABLY UNDERSTAND WHERE IM POINTING:




PHOTO OF SCRIPT (For seeing if i got correct scripting language (.HPS))
directlink: http://lookpic.com/O/i2/1597/ANEk4zSl.png
[Image: ANEk4zSl.png]

SCRIPT IN TEXT:

////////////////////////////
// Run First time starting map
void OnStart()

{
AddEntityCollideCallback("Player", "ScriptArea1", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door1", 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()
{

}


PICTURE FROM EDITOR:

directlink: http://lookpic.com/O/i2/310/PZ9dWpfA.png
[Image: PZ9dWpfA.png]
directlink: http://lookpic.com/O/i2/1852/0Q3sSlHw.png
[Image: 0Q3sSlHw.png]

Now i belive all u need is just the scripting part, but i just threw it all in there..


RE: DOOR PROBLEM.. >:o - Elven - 02-04-2012

Sure it is ScriptArea1, not ScriptArea_1?


RE: DOOR PROBLEM.. >:o - MicroDude - 02-04-2012

(02-04-2012, 10:38 PM)Elven Wrote: Sure it is ScriptArea1, not ScriptArea_1?
Yepp recently checked it. It is ScripArea1 Big Grin


RE: DOOR PROBLEM.. >:o - Elven - 02-04-2012

So, any of them doesn't work?



RE: DOOR PROBLEM.. >:o - MicroDude - 02-04-2012

I have tried the same script on 2 doors, still not working. Hold on im going to provide u with a vid..
Here maybe this photo will work ..

[Image: fuckina.png]



RE: DOOR PROBLEM.. >:o - Elven - 02-04-2012

And where is door Big Grin?

Plus you didn't answer my previous question Tongue



RE: DOOR PROBLEM.. >:o - MicroDude - 02-04-2012

By saying does "any of them work" I only have one door with the script currently ;o ..

And the door is right beneat the text saying "ACTIVE" ^-^


RE: DOOR PROBLEM.. >:o - Elven - 02-04-2012

Okay. But, do the sounds work?



RE: DOOR PROBLEM.. >:o - MicroDude - 02-04-2012

Nope the sound doesn't work either :/

[Image: 13b84e27ae884ad0a24d817d23b75be0.png]



RE: DOOR PROBLEM.. >:o - Elven - 02-04-2012

Thanks for that info. That gave me lots of info Big Grin

And I might have solved it Big Grin

void OnStart()



{

AddEntityCollideCallback("Player", "ScriptArea1", "func_slam", true, 1);

}

Why the hell there is space in between on start and scripts?