The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create a "Cave In" effect?
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#1
Create a "Cave In" effect?

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?

-Grind to the Gore-
(This post was last modified: 08-29-2013, 07:23 PM by GoreGrinder99.)
08-29-2013, 06:27 PM
Find


Messages In This Thread
Create a "Cave In" effect? - by GoreGrinder99 - 08-29-2013, 06:27 PM
RE: Create a "Cave In" effect? - by summit - 08-29-2013, 07:05 PM
RE: Create a "Cave In" effect? - by GoreGrinder99 - 08-29-2013, 07:23 PM



Users browsing this thread: 1 Guest(s)