CNC Guild Forums
 Contact Staff
 Voxel Comp ´06



 RA2 Mp maps
 RA2 Sp maps
 YR Mp maps
 YR Sp maps

 GFX Packs
 TSGFX Packs
 Recommended Downloads:
RA2 Missions Argentina -English-

Spawns and Enslaves Logic
Submitted by ArgCmdr

I wrote this in a desesperate attempt to prevent every question regarding Spawns= and Enslaves= cause its getting crowded of repeated doubts everywhere.

About Spawns= Logic

+ Only Aircraft can be spawned fully functionally.
+ Spawned units have two routines ONLY given by the Spawns logic, Attack and Return.
+ Spawned Units can be made to look like ground vehicles by modifying their FlightLevel=. However, theyll still be aircraft.
+ Ships, Tanks and 1x1 Buildings can use Spawns= with no problems.
+ Jumpjets can spawn units, but depending on the coding, units will either crash the game, or aircraft will fly in circles or be static until jumpjet lands, as its hardcoded to land at ground. So, Spawns from Aircrafts work, as long as Jumpjet hasnīt BalloonHover=yes set
+ Buildings that are more than 1x1 may spawn units, however, the return routine generates difficulties at the time of executing, as it is coded to land in the middle of a cell (thus, middle of where a unit/structure). On structures that are not 1x1. the center is between cells, so the odds are that the unit will wander around one or another cell trying to land, or crash the game. (Actually, someone should try if 3x3 structures can Spawn aircraft)
+ It is untested if Aircrafts can Spawn other Aircrafts, but its likely that logic has the same restrictions as Jumpjet locomotor
+ The Spawner controls the target of the Spawned, so whenever you retarget with Spawner, Spawned will also retarget. Notice that giving autonomy control to Spawned, either doesnt work, crashes the game, or clogs the Spawned (effect seems to vary, for some reason)
+ You always need a Spawner and a Spawned, Spawned units always need to have Spawned=yes, and Spawners need to have Spawns=X, and a weapon that has Spawner=yes, OmniFire=yes, and Warhead=Special
+ If what you want to get spawned are missiles, then Spawned must have MissileSpawn=yes set, flag which prevents the unit from executing the return routine.

Related Tags:
Spawns=Spawned ; Obvious, aint it.
SpawnsNumber= ; Number of Spawned Type units Spawner Spawns
SpawnRegenRate=600 ; Rate at which a spawned is regenerated in frames (15 frames = 1 sec)
SpawnReloadRate=150 ; Rate at which a spawned gets its ammo reloaded in frames (15 frames = 1 sec)
Primary=Weapon of the Spawner ; Links Spawn act with attack command.

[Weapon of the Spawner]
Damage=1 ; positive and low value, used to trigger the target effect.
OmniFire=yes ; Firer doesnt need to face target
Spawner=yes ; Passes targeting from spawner to spawned, needs Warhead=Special to conform a hardcoded routine that does so, and obviously, needed.
Warhead=Special ; Again, its part of the logic

Spawned=yes ; Needed for logic to work, recognises object as spawned
Landable=yes ; Needed, even if spawned, as it always has to reload
PipScale=Ammo ; Type of image at the low left corner of the selection box
Ammo=1 ; Quantity of Ammo...this is important, as non reloading spawnees can take ages to go back and land if they cant kill their target

About Enslaves= Logic

+ Only one Enslaved unit can be done at a time
+ Enslaved units are hardcoded to be called SLAV
+ Enslaved routine is only one, and its Harvest. Theres no way to have standard infantry slaves.
+ Enslaved units seem to be hardcoded to be infantry, or infantry that looks like vehicles (need confirmation here)
+ Enslaver can be any ground vehicle / building. Untested on infantry (would look odd anyway)

As you can see, theres not much to work around. So:

Related Tags:
Enslaves=Enslaved ; Sets which infantry unit is freed upon this objectīs destruction.
SlaveNumber= ; Number of slaves it spawns (doh)
SlaveRegenRate= ; In frames, regeneration of a slave upon its destruction
SlaveReloadRate= ; In frames, respawn of slave after it has returned with ore

HarvestRate= ; Used for harvesting infantry logic, speed of harvesting, would be, said fastly.
Slaved=yes ; needed, and a structure needs to have Enslaves=Enslaved for logic to work correctly. Determines if there are sounds used for free/enslaved stages (thanks to Apollo por pointing this out)

Credits to:
DeeZire (explaining Slave logic at its time, and for all the INI keys research)
Me, for compiling this whole...errr...thing, and testing around as much as possible.
Kravvitz, one or two bits of info around his posts that id have missed if i didnt read em.

> Back to Tutorials

Mental Omega 
raminator CnC 
Sleipnir's Stuff 
CNC Guild 
Project Perfect Mod 
CNC Source 
Sudden Strike 
C&C Reloaded 
Revora Frontpage 
Revora Hosting 

This site is best viewed at 1024x786  
Aqua Arg site design created by Mig Eater Đ 1999-2006 Team Revenge  
Should there be any problems with the site, please contact the current webmaster