Game Development Community

Actor Explode to Gibs Question

by Justin Dobbs · in Torque 3D Professional · 05/02/2012 (3:02 pm) · 22 replies

Ok guys I have been messing with this issue for several seeks now and I am stuck. What i want to do is explode the actor into chunky bits when it dies. here is what i have so far and it works just the particle never plays, any idea's what i am doing wrong? I have testes the particle itself in the editor and it does work.
function Armor::onDisabled(%this, %obj, %state)
{
   // Release the main weapon trigger
   %obj.setImageTrigger(0, false);
   %obj.playDeathCry();
   %obj.playDeathAnimation();
   %obj.startFade(1500, 0, true);
   %particles = new ParticleEmitterNode()   
   {  
      position = %position;  
      rotation = "1 0 0 0";  
      scale = "1 1 1";  
      dataBlock = "BloodyGibsEmitterNode";  
      emitter = "bloodBulletDirtSprayEmitter";  
      velocity = "1";  
   };  
   MissionCleanup.add(%particles); 
   %obj.FlashlightDisable();
   // Disable any vehicle map
   commandToClient(%obj.client, 'toggleVehicleMap', false);

   // Schedule corpse removal. Just keeping the place clean.
   //%obj.schedule($CorpseTimeoutValue - 1000, "startFade", 1000, 0, true);
   %obj.schedule($CorpseTimeoutValue, "delete");
}
Page«First 1 2 Next»
#21
05/08/2012 (6:42 am)
Excellent Work! Much better to have dismemberment with an explosion[imho]; keeps the suspension of disbelief going, and going and going...
#22
05/08/2012 (10:22 am)
I missed seeing the video the other day. That turned out great!
Page«First 1 2 Next»