Help with collison code
by Danny Mejia · in Torque Game Builder · 12/20/2006 (3:15 pm) · 1 replies
I have an anim sprite that need to delete when hit my the player missile. But the missile will not delete. Here my code:
function playerMissile::onCollision( %srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts )
{
if(%dstObj.class $= "cometShip")
{
//blow up the missle
%srcObj.safeDelete();
}
//blow up the comet
else
{
%dstObj.explode();
}
}
Is this because I have an anim Sprite?
function playerMissile::onCollision( %srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts )
{
if(%dstObj.class $= "cometShip")
{
//blow up the missle
%srcObj.safeDelete();
}
//blow up the comet
else
{
%dstObj.explode();
}
}
Is this because I have an anim Sprite?
About the author
Torque Owner Drew -Gaiiden- Sikora