GrenadeProjectileData, unable to call onCollision..
How come the BasicGrenade or even a second renamed grenade projectile has no working onCollision?
function BasicGrenade::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal){
echo("\n--------- ( BasicGrenade::onCollision ) ---------");
if(isObject(%targetObject)) { // z0dd - ZOD, 4/24/02. Console spam fix.
%targetObject.damage(%projectile.sourceObject, %position, %data.directDamage * %modifier, %data.directDamageType);
}
GrenadeLauncherFX(%data, %projectile, %targetObject, %modifier, %position, %normal);
}
Comments
Were you hoping to get the collision data from a pre-arming bounce of the projectile, or looking to add an environment area-based explosion as in your previous thread? If the latter, you could add it in the datablock's GrenadeProjectile::onExplode function, but as it doesn't pass the colliding object you will in this case have to find the object.
The seeking projectile has the same issue.. I will just half to forget about it for those 2 projectile types..