Frictional Games Forum (read-only)

Full Version: how to make floor break when u go to a certain area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
how do u go to a certain area and the floor creaks and the floor breaks and you fall down into a secret chamber. i played a custom story and they had that in there but i forgot which custom story it was
This would take a bit of explanation if you aren't familiar with Amnesia scripting. Do you know your way around .hps and basic scripts?

Also, welcome to Frictional Games. Big Grin

And this belongs in the development support section. Tongue
ty, but i already posted it so ill leave it like this. i watch tutorials and im 14 so i should be good and i play and watch lots of ppl playing custom stories, but do u no the scripts for it. ty
Well I know how to do this, but I'm pretty sure the floor is a custom entity.
so tat means you hav to import a floor into amnesia?
Well yes, but not just any floor. A breakable one.

But since that is a bit complex, I suggest you get out of the "floor breaking" stuff and use wooden boards.
u mean those wooden boards you break with a hammer
Yes.

By the way, here's the script.
Spoiler below!

PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""BreakingArea""BoardCreak"true1);
}

void BoardCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("WoodCreaking""CREAKINGNOISE.snt""BreakingArea"0.15ffalse);
AddTimer("ImFaaaalling"3.34f"StartFalling");
}

void StartFalling(string &in asTimer)
{
SetPropHealth("Board"0); //Not sure of the function


it worked!!!!!!!!!!!!!!!!!!!! yesssssssssss
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13