Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
McPwny

Lightning Gun

Recommended Posts

some time ago i saw a weapon in a mod map that spawns a cloud above the target and hits it with lightning, like a storm weapon. i thought this was a cool concept, but it looks stupid, and has a lot of down sides because it uses airburst logic: like being unable to shoot aircraft, being unable to use combat lighting, and being unable to have shrapnel weapons.

so i made a better lightning gun of my own design, and i would like to share the code for anyone looking to make some sweet mod maps: 

[LightningGun2]
Damage=75
ROF=80
Range=9    
Projectile=LightningGun2Projectile
Speed=40
Warhead=LightningGun2WH
Report=WeatherStrike
Bright=yes
MinimumRange=3

[LightningGun2WH]
Wall=yes
Wood=yes
CellSpread=2.0
PercentAtMax=.5
Verses=90%,85%,80%,85%,85%,75%,85%,80%,65%,100%,100%
Conventional=no
Rocker=yes
InfDeath=5
AnimList=EXPLOLB    ;KTSTLEXP
Tiberium=yes
Bright=yes
CombatLightSize=300%
Particle=LightningGun2Sys
PenetratesBunker=yes

[LightningGun2Projectile]
Inviso=yes
Image=none
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
AA=yes
AG=yes
ShrapnelWeapon=TeslaFragment
ShrapnelCount=5

[LightningGun2Part]
Deacc=.05
Image=WCLBOLT1
MaxEC=3
Velocity=1220
EndStateAI=3
WindEffect=4
BehavesLike=Smoke
Translucency=0
StateAIAdvance=4
DeleteOnStateLimit=yes

[LightningGun2Sys]
Spawns=yes
Slowdown=.03
HoldsWhat=LightningGun2Part
BehavesLike=Smoke
ParticleCap=7
SpawnCutoff=16
SpawnFrames=15.5
SpawnRadius=1
SpawnTranslucencyCutoff=12.5

 

; and dont forget these bits:

[Particles]
23=LightningGun2Part

[ParticleSystems]
14=LightningGun2Sys

posted image

it really does look better ingame, the gif maker had a hard time recording the quick flashes of lightning

 

EDIT: i made a map-mod compatible tank to go with it; it has a sort of "battery" logic where it stores up and depletes an energy bar

[SUVW]
Image=DSHP
UIName=Name:GAWEAT
Name=storm tank
Prerequisite=GAWEAP
Strength=300
Category=AFV
Armor=heavy
TechLevel=5
Sight=8
Speed=5
CrateGoodie=yes
Owner=Russians,Confederation,Africans,Arabs,YuriCountry
Cost=500
Soylent=500
Points=25
ROT=5
Crusher=yes
Explosion=KTSTLEXP
VoiceSelect=GenAllVehicleSelect
VoiceMove=GenAllVehicleMove
VoiceAttack=GenAllVehicleAttackCommand
ThreatPosed=20
DamageParticleSystems=SparkSys,SmallGreySSys
ImmuneToRadiation=yes
ImmuneToPsionics=yes
Size=13
Insignificant=no
Trainable=yes
SpeedType=Hover
Locomotor={4A582742-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousDestroyer
PipScale=Ammo
Passengers=0
DefaultToGuardArea=yes
GuardRange=12
OpportunityFire=yes
DistributedFire=yes
Reload=60
EmptyReload=180
ReloadIncrement=30
PipWrap=6
InitialAmmo=6
Ammo=18
Primary=LightningGun3

[LightningGun3]
Damage=50
ROF=10
Range=12    
Projectile=LightningGun2Projectile
Speed=40
Warhead=LightningGun2WH
Report=WeatherStrike
Bright=yes
MinimumRange=3
OmniFire=yes

posted image

Edited by McPwny
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

That is Awesome!
Can you make like the France cannon bullet with lightning around the sphere of the bullet and when it hit the unit or ground make the same animation of that weapon!

Share this post


Link to post
Share on other sites

u forgot ShrapnelWeapon=TeslaFragment  code ?

where is [TeslaFragment]  ?

Share this post


Link to post
Share on other sites

[TeslaFragment] is already in the game, its used on shock trooper's elite weapon.

to answer both your questions Yosef, the only way to attach an animation to a projectile like that is
through art.ini, which i cant port to map files. just like the 'making enemies into zombies' thing. it
could be done through genetic mutator logic if i could edit art.ini. the only thing you can do with
JUST rules.ini is give warheads "Infdeath=9" and they will turn into brutes (or whatever AnimToInfantry= is) 

while i am posting, i made another mod-map compatible lightning unit: an artillery that deploys into a defense
that sends out aircraft to attack with a storm weapon.
[Particles]
24=HugeSpark
25=CloudParticle

[ParticleSystems]
15=HugeSparkSys
16=CloudParticleSys

[XCOMET]
EliteSecondary=STORMAIRBURST

[AircraftTypes]
13=STORMRIDER

[AMBU];these two are the unit that deploys and calls the storm planes
UIName=STT:EMPTY
Image=LPST
Name=Storm hub (mobile)
Prerequisite=GAWEAP
Strength=500
Category=AFV
Armor=light
DeployTime=.022
TechLevel=5
Sight=8
Speed=6
CrateGoodie=yes
Owner=Russians,Confederation,Africans,Arabs,YuriCountry
AllowedToStartInMultiplayer=no
Cost=2500
Soylent=2500
Points=25
ROT=5
Crusher=yes
Turret=no
IsSelectableCombatant=yes
Explosion=EXPLOLB
VoiceSelect=GenAllVehicleSelect
VoiceMove=GenAllVehicleMove
VoiceAttack=GenAllVehicleAttackCommand
DieSound=GenVehicleDie
MoveSound=GrizzlyTankMoveStart
CrushSound=TankCrush
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=10
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ImmuneToRadiation=no
ImmuneToPsionics=yes
Size=6 ;4 ride for the price of one
Insignificant=no
Trainable=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
PipScale=none
Spawns=STORMRIDER
SpawnsNumber=1
SpawnRegenRate=1200
SpawnReloadRate=200
Primary=DefuseKit
Secondary=HornetLauncher
IsSimpleDeployer=yes
UnloadingClass=FTRK
DeployFire=yes
DeployingAnim=none  
OpenTransportWeapon=1
SelfHealing=yes


[FTRK];these two are the unit that deploys and calls the storm planes
UIName=STT:EMPTY
Image=SONIC
Name=Storm hub (mobile)
Prerequisite=GAWEAP
Strength=500
Category=AFV
Armor=light
DeployTime=.022
TechLevel=-1
Sight=8
Speed=6
CrateGoodie=no
Owner=Russians,Confederation,Africans,Arabs,YuriCountry
AllowedToStartInMultiplayer=no
Cost=2500
Soylent=2500
Points=25
ROT=5
Crusher=yes
Turret=no
IsSelectableCombatant=yes
Explosion=EXPLOLB
VoiceSelect=GenAllVehicleSelect
VoiceMove=GenAllVehicleMove
VoiceAttack=GenAllVehicleAttackCommand
DieSound=GenVehicleDie
MoveSound=GrizzlyTankMoveStart
CrushSound=TankCrush
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=10  
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ImmuneToRadiation=no
ImmuneToPsionics=yes
Size=6
Insignificant=no
Trainable=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Spawns=STORMRIDER
SpawnsNumber=1
SpawnRegenRate=1200
SpawnReloadRate=200
Primary=DefuseKit
Secondary=HornetLauncher
IsSimpleDeployer=yes
UnloadingClass=AMBU
DeployFire=yes
OpenTransportWeapon=1
SelfHealing=yes

[STORMRIDER];this is the storm plane itself
Image=ASW
UIName=STT:EMPTY
Name=stormrider
Secondary=ASWCollision
Strength=75
Category=AirPower
Armor=light
Spawned=yes
TechLevel=-1
Sight=2
RadarInvisible=no
Landable=yes
MoveToShroud=yes
PipScale=Ammo
Speed=16
PitchSpeed=.9
PitchAngle=0
Owner=British,French,Germans,Americans,Alliance
Cost=500
Points=20
ROT=3
Ammo=1
Crewed=no
GuardRange=30
Explosion=KTSTLEXP
MaxDebris=2
VoiceSelect=
VoiceMove=
VoiceAttack=
VoiceFeedback=
DieSound=
CrashingSound=OspreyDie
ImpactLandSound=GenAircraftCrash
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
MovementRestrictedTo=Clear
ThreatPosed=10  
DamageParticleSystems=SparkSys,SmallGreySSys
AuxSound1=IntruderTakeOff 
AuxSound2=IntruderLanding  
ImmuneToPsionics=yes
ImmuneToRadiation=yes
VeteranAbilities=STRONGER,FIREPOWER
EliteAbilities=STRONGER,FIREPOWER,SELF_HEAL,FASTER
Primary=STORMBOMBERGUN
ElitePrimary=STORMBOMBERGUNE


[STORMBOMBERGUN]
Damage=10
ROF=10
Range=5
Projectile=STORMPROJECTILE
Speed=70
Warhead=STORMCLOUDMAKERWH
Report=WeatherStrike
Burst=1;2

[STORMBOMBERGUNE]
Damage=10
ROF=10
Range=7
Projectile=STORMPROJECTILE
Speed=70
Warhead=STORMCLOUDMAKERWH
Report=WeatherStrike
Burst=2

[STORMPROJECTILE]
Arm=2
Shadow=no
Ranged=yes
AA=no
AG=yes
Image=none
ROT=100
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no
Airburst=yes
AirburstWeapon=STORMAIRBURST

[STORMCLOUDMAKERWH]
CellSpread=.3
PercentAtMax=.5
Verses=5%,5%,5%,5%,5%,5%,5%,5%,5%,5%,5%
InfDeath=5
AnimList=none
Particle=CloudParticleSys

[STORMBOMBERWH];this is the warhead that is actually used for damage
Wall=yes
Wood=yes
CellSpread=1.0
PercentAtMax=.5
Verses=70%,70%,70%,80%,80%,75%,13%,13%,13%,100%,100%
Conventional=no
Rocker=yes
InfDeath=5
AnimList=WCLBOLT1  
Tiberium=no
Particle=HugeSparkSys
PenetratesBunker=yes

[STORMAIRBURST];this is the gun that is actually used for damage
ROF=40
Range=3
Speed=30
Damage=90
Report=none;GuardianGIDeployedAttack
Warhead=STORMBOMBERWH
Projectile=InvisibleHigh

[HugeSparkSys]
HoldsWhat=HugeSpark
BehavesLike=Spark
ParticleCap=5
SparkSpawnFrames=25
LightSize=50
OneFrameLight=true
SpawnSparkPercentage=.1

[HugeSpark]
BehavesLike=Spark
MaxEC=1500
XVelocity=30    
YVelocity=30    
MinZVelocity=80    
ZVelocityRange=40
ColorList=(255,255,255),(100,100,255),(100,255,100),(255,100,100)
ColorSpeed=.13

[CloudParticle]
Image=WCCLOUD3
MaxEC=120
Translucency=50    
Velocity=1.0
Deacc=.15
WindEffect=0
BehavesLike=Smoke
DeleteOnStateLimit=yes
EndStateAI=60    
StateAIAdvance=1

[CloudParticleSys]
HoldsWhat=CloudParticle
Spawns=yes
SpawnFrames=1    
SpawnRadius=500
Slowdown=.0085    
ParticleCap=8;gs8
SpawnCutoff=1.1        
SpawnTranslucencyCutoff=12.5
BehavesLike=Smoke
posted image

Edited by McPwny
balance on the damage
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...