Game Development Community

Atmosphere /w radial dmg on impact

by Miguel Nunez · in Torque Game Engine · 10/07/2006 (11:51 pm) · 3 replies

I was looking for ways to do radial dmg with the fireballatmosphere, but after looking and playing around with it for a while it would look like I would have to change the way the fireballs are getting added from debris to projectiles. I attempted to change the code of the engine to accommodate for this but ended up making the game crash on load. Anyone one out there that has had any success at this ?

#1
10/23/2006 (6:55 pm)
All you need is to find the position of the fireballs collision with the terrain. Once you have that you can spawn a DamagableItemObjectType at that position and destroy it.

I wasn't even aware TGE even had Fireballs leftover from Tribes 2.
#2
10/29/2006 (4:40 pm)
I believe I have the answer for you at least far as getting the position via script. I setup a FireballAtmosphere in a mission. This FireballAtmosphere I assigned one explosion to. Obviously when it collides with something the explosion will be called via c++. Which will throw callback ::onNewDatablock

I grab the position wia that script callabck and spawn a projectile. It throws this callback twice, once with 0 as the object and once with the actual explosion id.

function ExplosionData::onNewDataBlock(%this, %obj)
{
   if ( %obj != 0 )
   {
      warn("ExplosionData::onNewDataBlock(" SPC %this.getName() @", "@ %obj SPC ")");
      error("Position:" SPC %obj.getPosition());
   }
}
#3
10/30/2006 (9:05 am)
Ah nice =) thanks for your posts, I will try this out asap and see if I can get something to work with it. Thanks again