Weather Tank-like weapon

Tutorial for Firestorm FS, Red Alert 2 RA2, Tiberian Sun TS, Yuri's Revenge YR

Avatar of Allied General

Allied General

Category: Code
Level: Intermediate
Created: Wednesday July 29, 2009 - 2:26
Updated: Sunday October 11, 2009 - 8:30
Views: 2785
Summary: Creating a weather tank-like weapon in TS, FS or RA2.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

This is the most basic code for weather tank like weapon. If you just copy and paste the next few lines you will encounter a Internal Error. The code is based on the cluster missile, chemical missile logic in TS.

You need to know basic adding in editing including adding new anims for visual effect.

              
Code
[WeatherWeapon]
Damage=1
ROF=0
Range=10
Projectile=WeatherProj
Speed=100
Warhead=WeatherWH
MinimumRange=3
Anim=WETHB


This weapon is like the aircraft carrier hornet launcher, it doesn't actually cause any "damage" its just used for targeting purposes. However if your not using ammo logic I would highly advice increase ROF. WETHB an anim which the old weather control device had of a beam shooting up into the sky, its located in conquer.mix

              
Code
[WeatherProj]
Arm=1
Proximity=yes
Ranged=yes
AA=no
ROT=5
Airburst=yes
AirburstWeapon=WeatherStrike
High=yes
VeryHigh=yes
SubjectToCliffs=no
SubjectToElevation=yes
SubjectToWalls=no


This projectile code is important as it tells the projectile, I will explode over enemy and create a new weapon called WeatherStrike

              
Code
[WeatherWH]
Verses=100%,100%,100%,100%,100%,100%,100%,100%,20%,100%,100%
AnimList=WEATHER1


This warhead invokes animation when WeatherProj explodes before creating a new weapon (in this case WEATHER1 is a weather cloud, you will need to create your own or use ww one)

              
Code
[WeatherStrike]
Damage=
ROF=1
Range=0
Projectile=WeatherProj2
Speed=5
Warhead=WeatherStrikeWH


This weapon actually causes the damage which is of course up to you

              
Code
[WeatherProj2]
Arm=3
Proximity=yes
Ranged=yes
Image=none
AA=no
ROT=1
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no


Simple projectile code

              
Code
[WeatherStrikeWH]
CellSpread=
PercentAtMax=
Verses=
AnimList=WEATHER2
InfDeath=5


Warhead of spawned weapon e.g. lightning bolt. Damage is up to you and WEATHER2 is lightning bolt animation

Important - due to the hack of a game which is TS/RA2/YR you will need to assign whatever weapon you added to the AirburstWeapon= to a dummy unit, the WEEDGUY and UTNK are classic examples, as long as a dummy unit has Primary, Secondary, ElitePrimary with the airburst weapon you will be find e.g.

              
Code
[DUMMYUNIT]
Primary=WeatherStrike

Return to top