Smoke Grenade

Fixious

Test Lead
I deleted my Legions folder when trying to get StoneHaven to work. But it's pretty damn easy to replicate. Unfortunately I just modified the Boost grenade, and didn't actually create a new grenade. Open up BoostGrenadeExplosion.cs and scroll down to line 169.

Code:
datablock ExplosionData(BoostGrenadeExplosion)
{
  soundProfileSet = RocketConcreteExplodeSoundSet;
  lifeTimeMS = 4200;
  // Volume particles
  //  particleEmitter = FRAGVolumeEmitter;
//  particleDensity = 35;
  //  particleRadius = 2.5;
  // Point emission
  
  emitter[0] = DustRingEmitter;
  emitter[1] = SteamExhaustEmitter;
   emitter[2] = SteamExhaustEmitter;
  // Sub explosion objects
  //  subExplosion[0] = FragGrenadeSubExplosion;
  //  subExplosion[1] = FragGrenadeSubExplosion2;
  lightStartRadius = 10;
  lightStartColor = "0.7 0.7 0.7 0.9";
  lightEndRadius = 0;
  lightEndColor = "0.0 0.0 0.00 0";
};

There are various Smoke particles you can mess with as well if you want to change things up. Just browse through the ParticleEmitter box in the editor. If this were a real possibility I'd also remove the elasticity so it doesn't bounce, along with a new sound and other stuff.
 

Fixious

Test Lead
Originally yes, but that was because it was emitting several instances of the same smoke shape. I've since lowered it to just two and there's very little FPS loss.
 

Armageddon

Teapot
Damn.. i figured it to be more like this (T1 Code)


Code:
function Smoker::onAdd(%this)
{   
   
    %obj = %this;
    %data = GameBase::getDataName(%this);
    schedule("Mine::Detonate(" @ %this @ ");",40.0,%this);
    if ($GrenadeIsSmoking != 1)
        {
        schedule("SmokeLikeHell(" @ %this @ ", 270);",3.0,%this); //Make sure only one smoke grenade can go off at a time
        schedule("$GrenadeIsSmoking = 0;",30.0);          //Or the game may crash, or just get REALLY slow
        }
   
}

function SmokeLikeHell(%this, %steps) //Smoke it up
{
    if(%steps)
    {
        $GrenadeIsSmoking = 1;
        %trans = GameBase::getMuzzleTransform(%this);
        %vel = Item::getVelocity(%this);
        Projectile::spawnProjectile("SmokeSpew",%trans,%this,%vel);
        schedule("SmokeLikeHell(" @ %this @ ", " @ %steps - 1 @ ");", 0.1);
    }
}
 

Synista

Member
Nice but I think it there should be more (thicker) smoke unless there are FPS issues or other confounding variables involved.
 
Top