Game Development Community

Debris and Explosion on Player Death??

by Kirby Webber · in Torque Game Engine · 11/20/2003 (6:29 am) · 1 replies

Perhaps someone out there might consider throwing me a bone.

Let me explain where I'm at:

I am using the "Racing Mod" (if you can still call it that) to create a vehicle-centric shooter style game.

I have defined the necessary functions and datablocks (in script) to decrement the player entity's health (remembering that the player IS the vehicle) and destroy the vehicle when health is depleted.

Originally having used the old Tribes 2 Wildcat script as a template (it's a hover vehicle), I had originally defined my debris file from within the main vehicle datablock. ( $debrisShapName I think?!)

This worked, about 33% of the time (I need it to work 100% - every time the player dies), though obviously never activated any nifty particle explosions or anything of that sort.

Following some examples found here and there around this site, I noticed that many vehicle scripts define a Debris / Explosion datablock for the vehicle entity.

I have fiddled around with the examples I have been able to scrounge, but nothing at this point seems to work.

If some has a working set of functions and/or datablocks that define and activate debris file AND an explosion effect for vehicles, could you please share this information, or point me to a tutorial that outlines the "proper" method for acheiving this effect? This is truly becoming a thorn in my side. ;-)

Thanks in advance for any and all help offered.

#1
11/20/2003 (8:13 am)
Also - as an aside... has anyone ever gotten "shields" to work?

I've been looking for a way to decrement the player energy level through script, and then apply a condition statement to apply the damage remainder to health.

The problem with THIS is that the only functions I can locate for energy are getEnergyLevel() and setEnergyLevel(). setEnergyLevel() is designed (as I understand it) to set the overall level of energy for the entity, therefore, manipulating the energy level in this fashion would be "ham handed" to say the very least.

Anyone have any thoughts?