Game Development Community

Exploding objects?

by Dale Cannon · in General Discussion · 03/02/2003 (5:32 pm) · 9 replies

Hi I am new to Torque and I am just looking for some tuts on how to create explosions, explodeing objects when shot or hit with vehicles. I dont even know if i create them in torque or with 3D max. Any thing will help. Thanks

#1
03/03/2003 (6:57 am)
the ppl from 3D Diggers have made an exploding barrel. i dont know if a tutorial is online, look on 3D Digger's site, with luck u find it :-)

http://www.3d-diggers.de/

sorry 4 my bad english :-(
#2
03/03/2003 (3:30 pm)
Thanx I downloaded it and tried it but cant seem to get it to work. and there is no tuts on it.
#3
03/04/2003 (4:14 am)
Cheers!
Did you follow the readme that is included?
Quote:
- put the shapes into "/data/shapes/barrel"
- put the script "barrel_destroy.cs (.dso!)" into "/server/scripts/"
- put this into "/server/scripts/game.cs" (below the other exec's):

exec("./barrel_destroy.cs");

- put this at the end of "/server/scripts/player.cs":


function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec)
{
error("Jeez!! I've been damaged with" SPC %amount);
%data.damage(%targetObject, %sourceObject, %position, %amount, %damageType);
}
That should be all to get it to run...
and you have to add it in the Torque Editor via "F11->F4->Shapes->BarrelDestroyShape" ...
If that still doesn't work, please post any errors you may get on the console here.
thanks!
beffy
#4
03/04/2003 (7:15 pm)
thanks Beffy
I did follow the readme but some things are unclear to me.
Ok a few questions about it. And to let you know I am not a programmer. So sorry if this sounds stupid.
OK..When it says:

- put the shapes into "/data/shapes/barrel"
does this mean put folder "shapes" into "/data/shapes/barrel" or just the actual shapes themselves? I put the folder "barrel" into the "/data/shapes" folder.

Next when it says:

- put the script "barrel_destroy.cs (.dso!)" into "/server/scripts/"
I just wonder what this means "(.dso!)" does it mean to leave off the .dso or not I tried it both ways.

and lastly all the shapes are named in a diff. language?!

I know this is probly plan as day to most of you. anyway hope you can help.
thanx
#5
03/05/2003 (4:34 am)
Here is how your folder structure should look like...
Then put the .cs.dso file in your "example/fps/server/scripts" folder and edit your example/fps/server/scripts/game.cs file like this...
I really can't think of any other problem you might have ... if you add it with the mission editor as I've described above, everything should work fine...
If not, please check your console and post any errors you may find... thx, beffy
#6
03/05/2003 (6:47 pm)
Hey beffy-
Thanks for the help it was my bad I was putting the wrong barrel in. I was getting the one from static shapes instead of shapes. it works great. Thanks again for the help. you DA man!
#7
03/06/2003 (9:28 am)
Hey beffy-
I would love to get the actual .cs instead of the .cs.dso file juat so I can study and learn from it. That is if you dont mind. Dcannon7@cfl.rr.com. If not thats cool I understand. Anyway thanks again for your help.
Peace
Dale
#8
08/14/2005 (2:55 pm)
Hi! Excelent resource that barrel but one thing bothers me, how to automaticly remove all debrif left after barrel explode, I should do that in cs file but since there is no cs file is there an alternate way?

I know that this thread is old but maybe somebody had similiar problem :)

Thanks!
#9
06/09/2008 (10:48 am)
Hi all, this is mostly directed at stefan but any help is welcome. I am trying to get an artillary barrage working for a class game involving a sort of capture the chest/flag scenario. For starters I need to get a barrel/cannon ball to explode with particle effects and damage radius. Any suggestions on how to make an object to drop in z axis (vertical) to a called in position? I couldnt find anythin on 3d diggers. Perhaps I should use the projectile datablocks from the fps as a template? Any help would be great, thanks.