Frictional Games Forum (read-only)

Full Version: DOOR PROBLEM.. >:o
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3


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..
Sure it is ScriptArea1, not ScriptArea_1?
(02-04-2012, 10:38 PM)Elven Wrote: [ -> ]Sure it is ScriptArea1, not ScriptArea_1?
Yepp recently checked it. It is ScripArea1 Big Grin
So, any of them doesn't work?
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]
And where is door Big Grin?

Plus you didn't answer my previous question Tongue
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" ^-^
Okay. But, do the sounds work?
Nope the sound doesn't work either :/

[Image: 13b84e27ae884ad0a24d817d23b75be0.png]
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?
Pages: 1 2 3