Game Development Community

RadiusDamage problems

by Justin DuJardin · in Torque Game Engine · 04/01/2002 (7:52 pm) · 2 replies

In duplicating a disc launcher like in tribes, i've managed to get it to fire the same, but the weird thing is, half of the time, you take NO damage from blast radius hits. here's a snippet to show you what i've got. Maybe i messed up somewhere?

function DiskProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
if (%col.getType() & $TypeMasks::ShapeBaseObjectType)
{
%col.damage(%obj,%pos,%this.directDamage,"DiskDisk");
}
radiusDamage(%obj,%pos,%this.damageRadius,%this.radiusDamage,"DiskDisk",%this.impulse);

}


and for the projectile i have defined as follows.

datablock ProjectileData(DiskProjectile) {
projectileShapeName = "~/data/shapes/disk/ammo.dts";
directDamage = 0;
radiusDamage = .5;
damageRadius = 7.5;
impulse = 1200;
..more here but cut out for length..
};

that's all the pertinent info i believe, any ideas guys? thanks in advance!

#1
04/01/2002 (8:24 pm)
Try this

function ProjectileData::onCollision(%this,%obj,%col,%fade,%pos,%normal) 
{ 
   if (%col.getType() & $TypeMasks::ShapeBaseObjectType) 
   { 
       %col.damage(%obj,%pos,%this.directDamage,%this.damagetype); 
   } 
   radiusDamage(%obj,%pos,%this.damageRadius,%this.radiusDamage,%this.damagetype,%this.impulse); 

} 

datablock ProjectileData(DiskProjectile) 
{ 
   projectileShapeName = "~/data/shapes/disk/ammo.dts"; 
   directDamage = 0; 
   radiusDamage = .5; 
   damageRadius = 7.5; 
   impulse = 1200; 
   damageType = "DiskDisk";
   //..more here but cut out for length.. 
};
#2
04/01/2002 (8:27 pm)
It's the terrain collision.

Remove terrain from the masks it checks to block the explosion and it should explode normally.