Game Development Community

Need help on landmine-esq weapon

by Benjamin Arsenault · in Torque Game Engine · 07/08/2007 (6:59 pm) · 2 replies

Currently I am practicing my Torque coding so I can soon start my own indie game, and am doing so by making addons for the game Blockland.
Right now my current project is a weapon pack that calls for a landmine like weapon. I have managed to create the weapon and model and eveything, the problem lies in that after it is fired, i cannot make it explode on collision with people. I disabled its bouncing which would cause it to blow up after the arm time and it has a 1 second arm time. All goes well except that as soon as the object comes to rest (a period wich lasts 10 seconds until it fades away) the object cannot be touched and will not blow up when a player walks into it.
Can anyone think of a way to assist me please?

my current on collision goes

function mineProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getclassname() $= "Player"){parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
}
}

note: the weapon still blows up when it hits a player if i were to throw it straight up.

About the author

Recent Threads


#1
07/09/2007 (7:05 am)
Update:
So my friend has helped me a bit with it and now it spawns an object where it hits that actas as the mine, now im looking for a way to make onPickup have the desired explosive results.