CSM- Poison Gas

Ask questions, discuss ideas, get answers
Post Reply
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

CSM- Poison Gas

Post by tekk »

I am wondering if anyone has any workable poison gas code , I found this code over at the old ssm site

Code: Select all

rem *** Gas Grenade ***
ObjectTemplate.Active SmokeGrenadeProjectile
ObjectTemplate.addTemplate hanomagVehicleSupplyDepot

ObjectTemplate.Active hanomagVehicleSupplyDepot
ObjectTemplate.radius 10
ObjectTemplate.team 0
ObjectTemplate.setHealth 20 -1.5 0
ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1
The thing with that code is that the deathbubble remains long after the smoke grenade times out. What im trying to do is have the mortar fire the smoke grenades as a projectile so basically lobbing poison gas canisters into bases ect. Now when I add that code to the mortar as such the death bubble dies as soon as the mortar launcher blows up after timing out.

Code: Select all

ObjectTemplate.Active Mortar_fire
ObjectTemplate.projectileTemplate SmokeGrenadeProjectile

ObjectTemplate.Active SmokeGrenadeProjectile
ObjectTemplate.addTemplate hanomagVehicleSupplyDepot

ObjectTemplate.Active hanomagVehicleSupplyDepot
ObjectTemplate.radius 10
ObjectTemplate.team 0
ObjectTemplate.setHealth 20 -1.5 0
I then thought I would just import the DCX gasgrenade projectile but ended up with a " Indefinitive time Tolive Error " that I could not solve :x , Anyways Im not happy with the deathbubble staying after the smoke grenade disappears so I was wondering if anyone has any Ideas or has found a fix to this issue. Urglub seemed to have a great idea by attaching the deathbubble directly to the smoke effects as such ,

Code: Select all

ObjectTemplate.Active e_SmokeGrenade
ObjectTemplate.timeToLive CRD_NONE/20/0/0
ObjectTemplate.addTemplate hanomagVehicleSupplyDepot
ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1
This would have solved my problem perfectly but this code does not seem to work at all, Im determined to get this working properly and need help, thanks
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
Coroner47
Posts: 213
Joined: Tue Nov 24, 2009 5:11 am
Location: Canada

Re: CSM- Poison Gas

Post by Coroner47 »

My 1st version of my air strike beacon used an effect to drop pco's that would live for a certain amount of time then explode. I think you'd be able to use this method and attach a supplydepot to the pco. You'd have to setup your pco to not bounce off the ground like mine does.

WepTweaks.con

Code: Select all

rem *** Give Smoke Grenade an Air Strike projectile ***
ObjectTemplate.Active SmokeGrenade
ObjectTemplate.projectileTemplate AirStrikeBeaconProj
AirStrikeBeacon.con

Code: Select all

rem *** Create tossable Air Strike Beacon projectile ***
ObjectTemplate.create Projectile AirStrikeBeaconProj
ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry SmokeGrenade
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.setHasPointPhysics 0
ObjectTemplate.hasCollisionEffect 0
ObjectTemplate.invisibleAtEndEffect 1
ObjectTemplate.hasArmor 1
ObjectTemplate.hitPoints 9999
ObjectTemplate.maxHitPoints 9999
ObjectTemplate.explosionDamage 0
ObjectTemplate.timeToLive CRD_NONE/30/0/0
ObjectTemplate.dieAfterColl 0
ObjectTemplate.radius 0.0
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.material 93
ObjectTemplate.material2 93
ObjectTemplate.useMMOnEndEffect 1
ObjectTemplate.damageType 1
ObjectTemplate.startEffectTemplate AirStrikeEffect
ObjectTemplate.noFFSound 1
rem *** tan gave mass to add drag ***
ObjectTemplate.mass 10

rem *** Create Particles to b spit out of Beacon Emitter ***
ObjectTemplate.Create PlayerControlObject AirStrikeParticles
ObjectTemplate.Geometry bullet_m1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.explosionRadius 20
ObjectTemplate.explosionDamage 10
ObjectTemplate.ForceOnExplosion 15
ObjectTemplate.drag 1
ObjectTemplate.mass 300
ObjectTemplate.hasArmor 1
ObjectTemplate.hitpoints 8
ObjectTemplate.maxhitpoints 8

ObjectTemplate.criticalDamage 9999
ObjectTemplate.hpLostWhileCriticalDamage 1

ObjectTemplate.inertiaModifier 0/0/0

rem ObjectTemplate.dieAfterColl 1
rem ObjectTemplate.hasCollisionEffect 1

ObjectTemplate.material 718
ObjectTemplate.addArmorEffect 0 e_ExplAni01 0/0/1.25
ObjectTemplate.addArmorEffect -1 WaterWaterExplosion  0/0/0

ObjectTemplate.setMinimapIcon ""

beginrem
rem *** Create Particles to b spit out of Beacon Emitter ***
ObjectTemplate.Create Bundle AirStrikeParticles
ObjectTemplate.Geometry bullet_m1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.explosionRadius 20
ObjectTemplate.explosionDamage 10
ObjectTemplate.ForceOnExplosion 15
ObjectTemplate.drag 1
ObjectTemplate.mass 300
ObjectTemplate.hasArmor 1
ObjectTemplate.hitpoints 8
ObjectTemplate.maxhitpoints 8

ObjectTemplate.criticalDamage 9999
ObjectTemplate.hpLostWhileCriticalDamage 1

ObjectTemplate.inertiaModifier 0/0/0

rem ObjectTemplate.dieAfterColl 1
rem ObjectTemplate.hasCollisionEffect 1

ObjectTemplate.material 718
ObjectTemplate.addArmorEffect 0 e_ExplAni01 0/0/1.25
ObjectTemplate.addArmorEffect -1 WaterWaterExplosion  0/0/0
endrem

*** Create Air Strike & Beacon effects ***
ObjectTemplate.create Bundle AirStrikeEffect
ObjectTemplate.addtemplate e_AirStrikeBeacon
ObjectTemplate.addtemplate e_AirStrike

rem *** Air Strike Beacon effect - Green Strobe ***
rem *** e_AirStrikeBeacon ***
ObjectTemplate.create EffectBundle e_AirStrikeBeacon
rem -------------------------------------
ObjectTemplate.addTemplate Em_AirStrikeBeacon
ObjectTemplate.timeToLive CRD_NONE/-1/0/0

rem *** Em_AirStrikeBeacon ***
ObjectTemplate.create Emitter Em_AirStrikeBeacon
ObjectTemplate.template Fx_AirStrikeBeacon
ObjectTemplate.looping 1
ObjectTemplate.startAtCreation 1
ObjectTemplate.lodDistance 200
ObjectTemplate.timeToLive CRD_NONE/0.2/0/0

ObjectTemplate.intensity CRD_NONE/10/0/0

ObjectTemplate.relativePositionInDof CRD_NONE/0/0/0
ObjectTemplate.relativePositionInUp CRD_NONE/0/0/0
ObjectTemplate.relativePositionInRight CRD_NONE/0/0/0
ObjectTemplate.startRotation CRD_UNIFORM/1/180/0

rem *** Fx_AirStrikeBeacon ***
ObjectTemplate.create SpriteParticle Fx_AirStrikeBeacon
ObjectTemplate.timeToLive CRD_NONE/0.1/0/0
rem ObjectTemplate.size CRD_NONE/0.50/0/0
ObjectTemplate.gravityModifier CRD_NONE/0/0/0
ObjectTemplate.sizeOverTime 0/0.1|67/0.40|100/0.5

ObjectTemplate.texture e_fire4

ObjectTemplate.initRotation CRD_UNIFORM/0/180/1
ObjectTemplate.destBlendMode BMInvSourceAlpha
ObjectTemplate.colorRGBAOverTime 0/183/255/5/255|100/183/255/5/255

rem *** Air Strike effect ***
rem *** e_AirStrike ***
ObjectTemplate.create EffectBundle e_AirStrike
rem -------------------------------------
ObjectTemplate.addTemplate Em_AirStrike
ObjectTemplate.timeToLive CRD_NONE/-1/0/0

ObjectTemplate.loadSoundScript ../Sounds/AirStrike.ssc

rem *** Em_AirStrike ***
ObjectTemplate.create Emitter Em_AirStrike
ObjectTemplate.template AirStrikeParticles
ObjectTemplate.looping 1
ObjectTemplate.startAtCreation 1
ObjectTemplate.lodDistance 200
ObjectTemplate.timeToLive CRD_NONE/100/0/0
ObjectTemplate.delay CRD_NONE/5/5/0

ObjectTemplate.intensity CRD_NONE/1/0/0

ObjectTemplate.relativePositionInDof CRD_UNIFORM/-10/10/0
ObjectTemplate.relativePositionInUp CRD_NONE/40/0/0
ObjectTemplate.relativePositionInRight CRD_UNIFORM/-10/10/0
ObjectTemplate.startRotation CRD_UNIFORM/1/180/0
Image
Pray hard, die fast
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: CSM- Poison Gas

Post by tekk »

Thanks Coroner for the reply, I think im gonna try find that error in importing the dcx poison gas grenade tommorow and if I cant then Im gonna try your method :)
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
Post Reply