Page 1 of 2

Wall x Explosion

Posted: Sun Jan 25, 2004 4:24 am
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?

Posted: Sun Jan 25, 2004 4:33 am
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.

Posted: Sun Jan 25, 2004 5:38 pm
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

Posted: Sun Jan 25, 2004 8:27 pm
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


Posted: Mon Jan 26, 2004 6:08 am
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.

Posted: Mon Jan 26, 2004 6:21 am
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!

:)

Posted: Mon Jan 26, 2004 6:31 am
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.

Posted: Mon Jan 26, 2004 6:41 am
by Axion
No problem; this site is for helping each other out.
:D

Posted: Tue Jan 27, 2004 1:05 am
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]

Posted: Tue Jan 27, 2004 1:34 am
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.

Posted: Tue Jan 27, 2004 3:48 am
by Axion
I'll take a look at it later, as I'm busy at the moment.

Posted: Tue Jan 27, 2004 5:27 am
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

Posted: Thu Jan 29, 2004 7:15 am
by Axion
Did you ever check it out?

Posted: Sat Jan 31, 2004 4:48 pm
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:

Posted: Sat Jan 31, 2004 9:37 pm
by Axion
I just emailed it you now.