some cave things


(redfox) #1

i had an idea: in the cave if you damage it too much a part of caves will fall…

my idea how to do it: i’ll make an invisible brush that is func_explosive then no sound and no debris… i’ll set the health and if thins brush is destroyed it will call out these fallen parts in the script… is it possible? and if it is, then how should the script look like?

then maybe if it’s fallen you can construct it and when done, then it will hide. i think this can be just like this: these fallen parts will be just as these construction materials and then it will construct an invisible brush that is somewhere away…

waiting for help, ty


(Wezelkrozum) #2

Yes it’s possible. It’s a constructible objective. If you create an invisible func_constructible and a script_mover.

At the first the script_mover (this are the rocks which will be drawn when the cave is intact. When a player destroys the cave this part will be invisible) has a health value. You can set this value to anything (like 10 but also 100000). The script_mover is now destroyable by every weapon.

Create everything you need for a constructible objective and put the func_constructible somewhere so it’s invisible for the players. Set the constructible objective to build at the mapstart.

Create an func_group (this will be the fallen rocks when the cave is destroyed. Draw then on the ground).

If a player destroys the script_mover a script will run (death). In that script you can trigger an func_explosion (alertentity command) so that there is an big explosion in the cave. Also kill the func_constructible and set the fallen rocks you made (the func_group) to default by using the alertentity command.

If a player construct the cave you must set the fallen rocks to invisible and set the script_mover to default.

A example will be aviable tonight. I’m working on it now. :slight_smile:


(redfox) #3

well… i’m very suprised that my idea worked :smiley: and even more thanks to you, but if thins are so, then i will go on with my story: i got a tank passing the cave and can i make this stop in front of the fallen parts when they’re active? (this doesn’t have to be, just asking)


(Wezelkrozum) #4

yes. It’s the same as a barrier. If the barrier is visible it will stop the tank (have a look at goldrush with the 4 barriers). The only thing you have to do is use an accum.


(Wezelkrozum) #5

Here can you download the prefab for a destroyable/constructible cave:
Map-file: http://84.24.10.228/wesselbestanden/prefabs/prefab_destroyable_cave.map
Script-file: http://84.24.10.228/wesselbestanden/prefabs/prefab_destroyable_cave.script
Bsp-file: http://84.24.10.228/wesselbestanden/prefabs/prefab_destroyable_cave.bsp


(redfox) #6

holy crap!! i have no words! just tyvm tyvm tyvm perfect!! again tyvm :smiley:


(Wezelkrozum) #7

Your welcome! For more solutions: pm me :slight_smile: