Author Topic: projectile collision?  (Read 544 times)

i am trying to make a shield that kills any projectile it comes in contact with by firing its own projectile to delete the other. ive tried to collide projectiles with the shield projectile collision
Code: [Select]
function greenshieldprojectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getType() & $Typemasks::ProjectileObjectType)
{
      %col.delete();
}
else
return
}
but the other projectile is not destroyed. can projectiles even collide with each other?


so would it be better to make a small vehicle that will collide in the same way but only has a 50 ms life?

Well I think a projectile just collides with anything with collsion. But i never made a projectile so i dunno if it has its own collison or not.

i know that it can collide with anything, exept if it can/cant collide with another projectile because i accidentally deleted the bedroom in a test  :cookieMonster:

edit: doing test with vehicles, though when i fire to spawn one, the game crashes
« Last Edit: July 11, 2009, 10:51:46 PM by Healbadbad »

Try looking at Space Guy's push broom reflector script.

:/ never even looked at the deflector