Red Alert 2's aircraft carrier logic is cool. The carrier spawns aircraft, the aircraft fly off and attack the carrier's target, and (if they aren't shot down) then return to the ship, despawning when they land. If the carrier dies, so too do its aircraft.
Possible Implementation:
I'm going to be honest, I don't know the full details of how it works. RA2's implementation uses the keys: Spawns=UNIT, SpawnsNumber=, SpawnRegenRate=, and SpawnReloadRate= on the spawning unit to control the obvious attributes, and Spawned=yes on the spawnee (I'm an artist who works primarily in TS so I'm out of my element here).
Whether this is the ideal implementation is up for discussion I think. There are obvious use cases that aren't accounted for in the spawn-act-dock-despawn life cycle, such as how this could be genericized for unit types other than aircraft. And elements of the behaviour that I'm sure some people would like to see customisable, like what should happen to spawned units when their parent dies?
It's a big one and I'm sure crosses over with ports of several other RA2 features.
Description:
Red Alert 2's aircraft carrier logic is cool. The carrier spawns aircraft, the aircraft fly off and attack the carrier's target, and (if they aren't shot down) then return to the ship, despawning when they land. If the carrier dies, so too do its aircraft.
Possible Implementation:
I'm going to be honest, I don't know the full details of how it works. RA2's implementation uses the keys:
Spawns=UNIT
,SpawnsNumber=
,SpawnRegenRate=
, andSpawnReloadRate=
on the spawning unit to control the obvious attributes, andSpawned=yes
on the spawnee (I'm an artist who works primarily in TS so I'm out of my element here).Whether this is the ideal implementation is up for discussion I think. There are obvious use cases that aren't accounted for in the spawn-act-dock-despawn life cycle, such as how this could be genericized for unit types other than aircraft. And elements of the behaviour that I'm sure some people would like to see customisable, like what should happen to spawned units when their parent dies?
It's a big one and I'm sure crosses over with ports of several other RA2 features.