Play animation after being shot
by William James · in Torque Game Engine · 05/29/2007 (8:59 pm) · 2 replies
I have a shape and I want the shape animation to play once it is shot three times.
How would I detect when the projectile has collided with the shape 3 times in order to get the animation to play? Any help would be nice :)
How would I detect when the projectile has collided with the shape 3 times in order to get the animation to play? Any help would be nice :)
About the author
#2
showing up as TSStatic which if I read correctly can't play animations
BTW I am using FPS Starter kit but with ModMakerWeapons if that even matters
05/30/2007 (7:33 pm)
I placed this code in athe items .cs file and nothing happened. Another thing is in the Inspector my object keeps showing up as TSStatic which if I read correctly can't play animations
datablock ShapeBaseData ( GirlTarget )
{
category= "target";
shapeFile="'data/shapes/target/Gun_Target.dts";
sequence0 = "fall.DSQ fall";
};
function GirlTarget::onCollision(%this, %obj, %col)
{
if(%col.getClassName() $= "Projectile")
{
%obj.playThread(0, "fall");
}
}BTW I am using FPS Starter kit but with ModMakerWeapons if that even matters
Employee Michael Perry
GarageGames
if(%obj.getDamageLevel(); > $DamageThreshHold) %obj.playThread(0, "bigDamage");