Wall x Explosion

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Wall x Explosion

Post by mcunha98 »

I want to know I eat I make to blow up a part of a wall from the explosion of a barrel (of gas or oil). Exists some tutorial that explains this therefore did not find?
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

Tltrude has an example map that should show you everything that you need to know, but I can't seem to find it on his site. I'm sure that he'll come along and give you the proper link.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

I found a tutorial one that he explains as to make an object to blow up from trigger, but sincerely I did not understand very well, the sequence of the used explanation very I am complicated, somebody I could give a simpler indication to me of as I make a wall to break from the explosion of a barrel?

http://homepage.tinet.ie/~abyrne/sdk/tu ... orial.html
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

I'll try to help you out, step by step. If this still sounds confusing, I'll try to clarify. I'm going to basically just try and adapt this straight from tlrude's example map, so if I screw up (and I probably will), he can hopefully come to the rescue. I'm not going to include debris remaining after the explosion, or explosion fx and sound. If what I'm about to give you works, we can add those goodies later on.

Okay, first make your gas barrel, place it close to the wall, and give it these values:

Key: health Value:50
Key: radiusdamage Value: 120 120 (These values depend on how close your barrel is going to be to the wall you want to blow up)
Key: targetname Value: explosive_barrel

Now, right click and select func_explodeobject. A brush should appear place that next to the section of the wall that you would like to be destroyed. Give it these values:

Key: setthread Value: barrel_bomb
Key: targetname Value: wall_trigger
Key: spawnflags Value: 148

Now, you'll probably want to make the hole in the wall that will be seen when the explosion has occurred. Go ahead and do that. Now select all the pieces, right click, go to "script" and select "object". Enter these values:

Key:targetname Value: Exploder
Key:#set Value: 1

That's it from the mapping end. Now to do a little scripting.

Code: Select all


main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Barrel o' fun"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" ""

	// call additional stuff for playing this map round based is needed
	if(level.roundbased)
		thread roundbasedthread
//////////////////////////
level waittill prespawn
/////////////////////////

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/barrel.scr ( <--- PUT YOUR MAP NAME HERE)
exec global/exploder.scr
	
//////////////////////
level waittill spawn
/////////////////////

end

//

roundbasedthread:

level waitTill prespawn
level waittill spawn

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = kills // set to axis, allies, kills, or draw

	//level waittill roundstart

end

// Barrel o' fun

barrel_bomb:

	exec global/exploder.scr::explode 1 // blows up the #set 1 exploder
	
end

"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

im interested in that part
Axion wrote:I'm not going to include debris remaining after the explosion
,i managed 2 make a destroyable wall but iam more interested in the parts that fly off the wall (not spawnflags,but the chunks)i read the exploder.scr and it gives a brief explanation on how 2 make things explode ,and leave remains behind .but the part where u make chunks that fly off the wall isnt explained (it said 2 make it like quake3 ,but i dont know how :oops: )can any1 plz tell me how.

p.s.:the wall i made is blown away by firing at it,although blowing a barrel beside it should achieve the same result.try reading the exploder.scr in the pak#.pk3 files it should help.
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

Bjarne has covered how to make debris from an explosion already from his great tutorial on blowing up multiplayer objectives.

Here's an excerpt, with a few minor alterations that I added to make it comply for blowing up a wall-

Select all the brushes (The ones that are going to be debris) one by one and make them script_object's ( right click on the map grid and select script->object ).
Give them these key-value pairs :

#set 1 //The ID that connects all the parts of the objective to the bomb.

targetname exploderchunk // Tells the exploder system that this is an item that shall be hurled when the bomb is blown. Place the pieces a bit outside the wall ( don't worry, the exploder system will hide them until the bomb blows ).

Where to throw the debris?
Create a script_origin ( with nothing selected, right click on the map grid and select script -> origin ) for each piece where you want it to be hurled ( Remember: It will start in that direction, and then be drawn towards the ground as gravity takes over ).

Unselect everything, select first the piece then the script_origin, then press CTRL+k ( this konnects the entities. Order is important ). You can also set the targetname of the script_origin and then set the target key of the piece to the same value ( using CTRL+k gives targetnames like t3, and that can be hard to debug ).

You should now have some debris that point a blue arrow towards one red box each.


If you wish to read the whole tutorial, go here-

http://map.moh-central.net/t.php?id=29

Hope that helps you out!

:)
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

thnx alot,thats exactly what i needed,i did go thru the tutorials but i never thought id find it there (im making a dm map not an obj :oops: )tnx again.
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

No problem; this site is for helping each other out.
:D
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Axion

First obliged for the explanations and the aid, I followed the steps that you he indicated, I did not occur no error, but also nothing of different did not occur when the gas barrel blows up. The example that I made is available in link below, you could say me what I made of wrong?


http://planeta.terra.com.br/informatica ... nebase.zip
In this serving click with the right and I will choose "To save as..."


It is a well simple map, it has a tank, a barrel and one object to reflect the explosion of the barrel, however nothing it happens... :roll:
[/url]
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

if u dont want debirs, make the wall a func_window. target name it wall1 in the script add

$wall1 immune bash
$wall1 immune bullet
$wall1 immune fastbullet
$wall1 immune shotgun

that way the barrels will blow it up, and bullets wont.
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

I'll take a look at it later, as I'm busy at the moment.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

I tinkered around a little bit and got everything working. You can download the updated files here- (Right click the link and choose to save it, or else it won't work.)

http://www.axion.00freehost.com/files/Benzinebase.zip
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

Did you ever check it out?
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

The file does not disponible !
Please send the file again to server or send me by e-mail:
mcunha98@terra.com.br :roll:
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

I just emailed it you now.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
Post Reply