Author Topic: Weapon_GasCan  (Read 1308 times)

I know I'm late, but I decided to actually see why Rotondo did not execute the GasCan item in Gamemode_Zombie. Apparently it does the same explosion as the Propane Tank, so until he changes that it was not meant to be executed. Here is the code:

Code: [Select]
datablock ExplosionData(GasCanFinalExplosion : vehicleFinalExplosion)
{
   //explosionShape = "";
   lifeTimeMS = 150;

   debris = GasCanDebris;
   debrisNum = 1;
   debrisNumVariance = 0;
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisThetaMin = 0;
   debrisThetaMax = 20;
   debrisVelocity = 18;
   debrisVelocityVariance = 3;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "7.0 8.0 7.0";
   camShakeAmp = "10.0 10.0 10.0";
   camShakeDuration = 0.75;
   camShakeRadius = 15.0;

   // Dynamic light
   lightStartRadius = 0;
   lightEndRadius = 20;
   lightStartColor = "0.45 0.3 0.1";
   lightEndColor = "0 0 0";

   //impulse
   impulseRadius = 10;
   impulseForce = 1000;
   impulseVertical = 2000;

   //radius damage
   radiusDamage        = 1000;
   damageRadius        = 10.0;

   //burn the players?
   playerBurnTime = 4000;

};

datablock ProjectileData(GasCanFinalExplosionProjectile : vehicleFinalExplosionProjectile)
{
   directDamage        = 0;
   radiusDamage        = 0;
   damageRadius        = 0;
   explosion           = GasCanFinalExplosion;

   directDamageType  = $DamageType::GasCanExplosion;
   radiusDamageType  = $DamageType::GasCanExplosion;

    brickExplosionRadius = 8;
   brickExplosionImpact = false;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 30;             
   brickExplosionMaxVolume = 30;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloating = 60;  //max volume of bricks that we can destroy if they aren't connected to the ground (should always be >= brickExplosionMaxVolume)

   explodeOnDeath = 1;

   armingDelay         = 0;
   lifetime            = 10;
};

datablock ParticleData(GasCanFireParticle)
{
textureName          = "base/data/particles/cloud";
dragCoefficient      = 0.0;
gravityCoefficient   = -1.0;
inheritedVelFactor   = 0.0;
windCoefficient      = 0;
constantAcceleration = 3.0;
lifetimeMS           = 1200;
lifetimeVarianceMS   = 100;
spinSpeed     = 0;
spinRandomMin = -90.0;
spinRandomMax =  90.0;
useInvAlpha   = false;

colors[0] = "1   1   0.3 0.0";
colors[1] = "1   1   0.3 1.0";
colors[2] = "0.6 0.0 0.0 0.0";

sizes[0] = 0.0;
sizes[1] = 2.0;
sizes[2] = 1.0;

times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};

datablock ParticleEmitterData(GasCanFireEmitter)
{
   ejectionPeriodMS = 5;
   periodVarianceMS = 4;
   ejectionVelocity = 0;
   ejectionOffset   = 1.00;
   velocityVariance = 0.0;
   thetaMin         = 30;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;

   //lifetimeMS = 5000;
   particles = GasCanFireParticle;   
};

datablock ShapeBaseImageData(GasCanBurnImage)
{
    shapeFile = "base/data/shapes/empty.dts";
emap = false;

mountPoint = 7;
offset = "0 0 0";

stateName[0] = "Ready";
stateTransitionOnTimeout[0] = "FireA";
stateTimeoutValue[0] = 0.01;

stateName[1] = "FireA";
stateTransitionOnTimeout[1] = "Done";
stateWaitForTimeout[1] = True;
stateTimeoutValue[1] = 0.9;
stateEmitter[1] = GasCanFireEmitter;
stateEmitterTime[1] = 0.9;

stateName[2] = "Done";
stateTransitionOnTimeout[2] = "FireA";
stateTimeoutValue[2] = 0.01;
};

function Player::setonfire(%col)
{
%col.schedule(8000,"stopBurn");
%col.mountimage(GasCanBurnImage,2);
%col.schedule(8000,unmountimage,2);
//%col.schedule(1000,"emote",playerBurnImage);
%col.schedule(500,"setTempColor","0 0 0 1",8500);
//%col.schedule(5000,"burn");
}

What I do not understand is why when I do shoot it, there is no fire, and it does not spawn an emitter on the ground to continuously hurt players/bots that touch it, like in the Molotov roostertail.


Is there any way to change the explosion so it works like the Molotov roostertail and creates a fire?

inb4Zero demands it be called Jerry

I saw it to I dont why Rontondo ask him maybe Weapon_Propane_Tank use that script to explode but problem diffrent explosin

I saw it to I dont why Rontondo ask him maybe Weapon_Propane_Tank use that script to explode but problem diffrent explosin


That's the reason it was not being executed in the script, it does the exact same as the Propane Tank, just a diffrent model, I just don't know what to change so it works just like the Molotov roostertail weapon and leaves an area of fire there.