Queestion on large explosive objectives


(SteelRat) #1

I am currently working on a project that includes a structure that is unusually large and I don’t want to cover the whole objective with the TOI brush. I only want it to be possible to plant TNT at a specific spot but I want the whole structure to be destroyed or invisible when you blow it up.

I was thinking of making part of the structure func_explosive and then make the rest invisible using setstate once it is blown.

Any good ideas on how to do it better or smarter?

/SteelRat


(FireFly) #2

I’ve done something similar in my current map some time ago.
The method you’re describing is probably the best, if not, the only way to do it…
Make the part where the dynamite needs to be planted a func_explosive, covered with a TOI-brush,
Turn the structure that is getting destroyed into a Script_mover (needs an origin brush) and give it the same target-and scriptname.

For a nice explosion effect of the structure you can also add a target_effect and /or a target_explosion or even a bunch of them to make a really big boom! :stuck_out_tongue:


(badong) #3

you can make the whole thing a func_explosive not just parts of it. The trigger brush
doesn’t really have anything to do with the explosion. It’s really just what it says…a trigger.
What i’m trying to say is that you can put your trigger brush on one end of the map if you want, and then put the func_explosive on the other end and the explosion will work perfectly. The trigger brush doesn’t have to cover the func_explosive (hell…like i said they don’t even have to be in the same place in the map) nor do they have to be the same size. As long as trigger brush targets the func_explosive , any time you place a dynamite inside the trigger, the func_explosive(no matter how big it is or where it is in the map) will be destroyed.
Hope this helps :cool:


(SteelRat) #4

Thanks badong, I did that on the Island map and what happened was that Allies could destroy the objective even if they planted outside the trigger, although they didn’t win the game. Same with Axis, they could plant the TNT outside the trigger and destroy their own objective.
I may have done something wrong but when I covered the whole obj with the TOI the problem was gone.


(SteelRat) #5

FireFly - I tested this: "Turn the structure that is getting destroyed into a Script_mover (needs an origin brush) and give it the same target-and scriptname. "
But I must be missing some entity settings since nothing happens with the structure once the obj is blown. Do you have any clues on what I need to add? can you really used a script mover on brushes? I thught they only worked on models??
I looked at the level designers reference but could not find any details about the script mover part from moving objects?

/SteelRat


(nUllSkillZ) #6

You can do this without a script_mover. Just a trigger and a func_explosive.
If you use a script_mover you have to write a script.
In this script there has to be the part:


game_manager
{
	... // your stuff
}

SCRIPTNAME_OF_script_mover
{
	... // your stuff

	spawn
	{
		... // your stuff
	}

	death
	{
		setstate SCRIPTNAME_OF_script_mover invisible
	}
}


(FireFly) #7

I made a mistake, I didn’t use a script_mover but used a func_static instead…

I made a small testmap for you to download so you can see how it all works. bsp, map-file and script are all included. Like nUllSkillZ said, most of the stuff is done by scripting.

You can download it here


(SteelRat) #8

Thanks a million FireFly! :smiley:


(SteelRat) #9

I got it to work thanks to you, these pictures should explain why I did not want to cover the whole obj in TOI (would been kinda hard to defend as well ;)) The objective on this small map (2048^3) is to destory the other teams slide and ruin their fun. It may not be the most beautiful map I’ve made, especially not the terrain - It think it will bring plenty if fun though.



(Loffy) #10

That looks nice. who doesn’t like to run and slide down that!
Get it finished!
// Loffy

PS. It’s Friday!


(=DaRk=CrAzY-NuTTeR) #11

you can plant outside the brush? there is somet wrong with your map


(SteelRat) #12

Eh…no, that is just what this script above solved. You can’t plant outside the trigger brush…


(=DaRk=CrAzY-NuTTeR) #13

ahhhh, few :slight_smile:


(SteelRat) #14

The map has been released now, if you want to test it get the file at http://www.srcgaming.com I promise it is great fun!
Once again, thanks to FireFly!

/SteelRat