Game Development Community

Destroying objects

by Sabrecyd · in Torque Game Engine · 05/17/2002 (5:23 am) · 4 replies

Anyone know how to go about having Destructible static objects?
I don't mean structures or terrain (although that would be cool too). I'm just thinking of something along the lines of those toxic waste barrels in Doom for example.

Anything to get me started would be appreciated.

Thanks,
Sabrecyd

#1
05/17/2002 (5:28 am)
Well, the easiest way would be to assign damage values to these objects, and if it exceeds a certain threshold, play an animation sequence showing the destruction (similar to the death animations) - I guess that is pretty much the way it was done in Tribes 2 for vehicles e.t.c ..? But maybe that's not exactly what you want...
#2
05/17/2002 (5:46 am)
Thanks Stefan.
I think something like that would work.
Do you happen to know which datablock types already support a maxDamage type setting? I know PlayerData does.
I could also just assign a new one like you mentioned too. I'm just wondering how the engine knows how to apply the onDamage and onDisabled functions (like in the Player.cs file).

I really need to start going through the C code more :)
#3
05/17/2002 (9:31 am)
any ShapeBase derived object is destructable, you just need to work out the scripts. Also vehicles dont have an animation, they have a special shape which has pieces of the vehicle. When the vehicle is destroyed a explode function is called which draws a nice explosion effect and throws the pieces in this special shape all around the place
#4
05/17/2002 (9:40 am)
ahh..
Slowly but surely the wheel is starting to turn again.
That's what happens when you kill too many brain cells :)

Thanks Xavier.
Like the name btw, that was my French name back in high school.