Adding a Flamethrower

Tutorial for Red Alert 2 RA2, Yuri's Revenge YR

Avatar of Allied General

Allied General

Category: Code
Level: Intermediate
Created: Wednesday July 29, 2009 - 3:16
Updated: Sunday October 11, 2009 - 8:26
Views: 3296
Summary: Adding a flamethrower weapon to RA2 without using particle systems.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

Basic code is from SuperNova mod which is free to download from YRArgentina and use as long as the mod and Napalm be credited.

I'm gonna plug in some code for you as anyone reading this should know basic weapon coding. Figures such as Damage etc can be altered but due to projectile nature, keep range low.

              
Code
[FThrower]
Damage=60
ROF=60
Range=4
Projectile=FlameFire
Speed=13
Burst=1
Warhead=FLAMEWH
Report=ExplosionApocalypse
Anim=S_BANG16
Bright=yes


This code essentially uses a invisible projectile which has a flame trailer

              
Code
[FlameFire]
Image=BURN
Shadow=no
Arm=2
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes
ROT=1
CourseLockDuration=-2 ; travel in straight line (code is adapted from medusa weapon code)
Proximity=yes
Ranged=yes

[FLAMEWH]
CellSpread=1
PercentAtMax=.4
Wall=no
Wood=yes
Verses=200%,200%,80%,60%,45%,30%,35%,15%,15%,30%,60%
Conventional=no
Fire=yes
InfDeath=4
AnimList=BURNEXP
ProneDamage=100%
Bullets=yes


              
Code
[BURN]
Trailer=BTRAIL

[BTRAIL]
Normalized=yes
Translucent=yes
Translucency=80
Report=ExplosionShard
UseNormalLight=yes

[BURN] ; Flames fireball
Trailer=BTRAIL ;BURNTR

[BTRAIL]
Normalized=yes
Translucent=yes
Translucency=80
Report=ExplosionShard
UseNormalLight=yes


The basic logic is that the projectile is invisible but has a trailer which resembles the flame trail.

You can add damage to the trailer by Damage= but this may damage the unit which fired it.

Note for the flame explosion to appear you need to add it to the end of the [Animations] and as a general rule and good pratice (once u have multiple things) add your new warhead to end of [Warheads] as well

Do not use particle flame systems like in TS because

1. Unit gains no experience

2. Hard to balance damage (e.g. shit weapon or overpowered)

3. Hurts allies as well.

Finally Ambient damage only works with

1) railguns
2) sonic weapons
3) firestream

Sparky logic can be used but at least three anims must be stated on OnFire= statment

Links / Downloads

 HitsAdded
hot.zip1169July 29, 2009 - 3:20

Credits

Original MaterialNapalm

Return to top