Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: phreak on February 02, 2007, 09:29:49 pm
-
Right, now whenever a spawn weapon spawned its child weapons, the children would home in on whatever was in view as long as it was red. So i figured we can change this, and the change was actually really easy. So now, you have the option of having the child weapons home in on whatever the parent weapon was homing on, basically this allows you to create multi stage missiles, or swarm torpedos, or a cloud of death.
The code is really simple. Basiclly you just add the flag "inherit parent target" in the child weapon and you're all set. You just need to make sure the parent weapon and child weapon homes too. Depending on this thread discussion, i may rename the flag to "pass lock to child" and have the flag appear in the parent weapon. I don't know which one would be preferred.
EXTRA BOLD -- TAKE NOTE
test build is here: http://www.hard-light.net/forums/index.php/topic,45175.0.html
#Secondary Weapons
$Name: Piranha
+nocreate
$Homing: YES
+Type: HEAT
+Turn Time: 1.0
+View Cone: 80.0
$Spawn Angle: 30
$Name: Cluster Baby
+nocreate
$Flags: ("inherit parent target")
#End
-
I said cool when I noticed this in the commit log. :yes:
I like the idea of making multi stage missiles with it though :)
-
cool, i already got a weapon which could use this
-
Now we can replicate the Cyclone Missile from Descent 3...and the EarthShaker Missile from Descent II :pimp:
I loved Descent3's spawn system. You could make anything spawn almost anything with a little table file editing.
-
$Name: Swarm Torpedo
$Model File: belial.pof
$Mass: 20.0
$Velocity: 450.0
$Fire Wait: 5.0
$Damage: 200
$Detonation Radius: 300
$Blast Force: 160.0
$Inner Radius: 65.0
$Outer Radius: 125.0
$Shockwave Speed: 250.0
$Armor Factor: 1.0
$Shield Factor: 1.0
$Subsystem Factor: 1.0
$Lifetime: 4.0
$Energy Consumed: 0.0
$Cargo Size: 20.0
$Homing: YES
+Type: ASPECT
+Turn Time: 3.0
+Min Lock Time: 4.0
+Lock Pixels/Sec: 20
+Catch-up Pixels/Sec: 40
+Catch-up Penalty: 10
$LaunchSnd: 92
$ImpactSnd: 88
$FlyBySnd: -1
$Rearm Rate: 0.1
$Flags: ( "player allowed" "huge" "Spawn MiniTorp, 4" "bomb")
$Trail: ;; Trail cannot be set if Exhaust is set
+Start Width: 0.25
+End Width: 0.7
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 0.3
+Bitmap: newmiss1
$Icon: iconTrebuchet
$Anim: trebuchet
$Impact Explosion: expMissileHit1
$Impact Explosion Radius: 15.0
$Spawn Angle: 30.0
$Name: MiniTorp
$Model File: tsunami.pof
$Mass: 1.2
$Velocity: 175.0
$Fire Wait: 0.5
$Damage: 1000
$Blast Force: 45.0
$Inner Radius: 100.0
$Outer Radius: 160.0
$Shockwave Speed: 80.0
$Armor Factor: 1.0
$Shield Factor: 0.1
$Subsystem Factor: 1.0
$Lifetime: 6.0
$Energy Consumed: 0.0
$Cargo Size: 2.0
$Homing: YES
+Type: ASPECT
+Turn Time: 1.0
+Min Lock Time: 7.0
+Lock Pixels/Sec: 70
+Catch-up Pixels/Sec: 120
+Catch-up Penalty: 15
$LaunchSnd: 94
$ImpactSnd: 88
$FlyBySnd: -1
$Rearm Rate: 1.0
$Flags: ("child" "huge" "inherit parent target")
$Trail:
+Start Width: 0.25
+End Width: 0.75
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 1.0
+Bitmap: MissileTrail02
$Icon: iconmissile08
$Anim: LoadMissile06
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 25.0
-
Awesome. :yes:
-
Nice, I can make use of this.
-
has anyone tried this and would like to comment?
Any opinions on whether the flag should be "pass lock to child" or "inherit parent target"
-
I think "inherit parent target" would be less confusing and easier to remember.
-
woohoo!
Battlestar Pegasus cluster rounds!
-
Yay, HW2-style ship torpedoes :yes: