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!
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!
#2
Remove terrain from the masks it checks to block the explosion and it should explode normally.
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.
Torque Owner Daniel Neilsen
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.. };