Spawning Tutorial

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

No Avatar

Hybrid

Category: Code
Level: Beginner
Created: Wednesday July 29, 2009 - 5:19
Updated: Wednesday July 29, 2009 - 5:19
Views: 4803
Summary: Tutorial on the spawning system in RA2 and YR.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

We are all familiar with spawning. The idea is that one unit launches several different units to fight enemy units. The aircraft carrier uses this, and the destroyer uses this when fighting submarines. The spawning code can also be used to make missiles that can be shot down - ie. the V3 and the Dreadnought use this.
The unit which spawns other units must have this somewhere in the entry:

Spawns= ; What it spawns

SpawnsNumber= ; How many units it spawns

SpawnRegenRate= ; How long it takes to make new spawned units after the first lot has been destroyed

SpawnReloadRate= ; How long it takes to reload the spawned unit. This can be 0 if the spawned unit has unlimited ammo...

NoSpawnAlt= ; this entry tells the game whether the unit has a different voxel if it doesn't have the unit ie. v3 and empty v3. If it does have a different graphic, the unit has to end with "wo" (with out).

The weapon of the unit which spawns the thing must be:
Primary=SpawnedunitLauncher

The spawned unit should have somewhere in its entry a tag called:
Spawned=yes

The SpawnedunitLauncher weapon should have a section that looks like this:

Damage=1 ; Must be 1 in order to be used - don't change this

ROF=150 ; Don't quite get this - don't change this

Range= ;Whatever you want, but -2 is infinite. Add an entry called MinimumRange= if you are having missiles

Spawner=yes ; Self explanatory

Projectile=Invisible ; The spawned unit has its own graphics - don't change this. InvisibleHigh if it’s like the V3 missile.

Speed=10 ; I think it must be 10 in order for it to be valid

Warhead=Special ; Don't change this

OmniFire=yes ; this means the unit can fire at other units (in our case launch other units) without having to face them, even if it doesn't have a turret. The aircraft carrier and aegis use this logic as they are quite slow at turning.

Credits

Original MaterialCommodus

Return to top