Frictional Games Forum (read-only)
Create a "Cave In" effect? - 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: Create a "Cave In" effect? (/thread-22637.html)



Create a "Cave In" effect? - GoreGrinder99 - 08-29-2013

I'm looking to create a cave in effect but to no luck.

This here are the scripts pertaining to the cave in:

void OnStart()
{
AddEntityCollideCallback("Player", "CaveIn", "CaveIn", true, 1);

SetEntityActive("CaveInFloor", false);
}

void CaveIn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("special_tunnel_1", false);
SetEntityActive("CaveInFloor", true);
SetEntityActive("block_box_11", false);
AddPropForce("cave_in_1", 1000, 0, 0, "world");
}

After coming to the end of the tunnel I want to have a camera shake and after a small delay for the player to decide if they want to turn back or continue, the cave_in.ent file will collapse into the tunnel, and onto the floor I created since the player won't be able to return to the tunnel afterwards.

Oh, but then again it would be a matter if allowing the player to backtrack out after deactivating the tunnel.

I figured a block box was in my way so I tried to deactivate it as well but after colliding with the area neither the "CaveInFloor", "block_box_11", or the "special_tunnel_1" were de/activated. Any suggestions?


RE: Create a "Cave In" effect? - summit - 08-29-2013

Is the "special_tunnel_1" the tunnel which used in the main menu?
I mean "special_menu_tunnel_1".


RE: Create a "Cave In" effect? - GoreGrinder99 - 08-29-2013

(08-29-2013, 07:05 PM)Arbies Wrote: Is the "special_tunnel_1" the tunnel which used in the main menu?
I mean "special_menu_tunnel_1".

No, the secret tunnel in the prison levels but no more worries, I have found a solution.