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

Title: New spawn weapon option
Post 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

Code: [Select]
#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
Title: Re: New spawn weapon option
Post by: karajorma on February 03, 2007, 02:25:08 am
I said cool when I noticed this in the commit log. :yes:

I like the idea of making multi stage missiles with it though :)
Title: Re: New spawn weapon option
Post by: Nuke on February 03, 2007, 03:48:16 am
cool, i already got a weapon which could use this
Title: Re: New spawn weapon option
Post by: Gregster2k on February 03, 2007, 03:58:06 am
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.
Title: Re: New spawn weapon option
Post by: phreak on February 03, 2007, 02:14:32 pm
Code: [Select]
$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
Title: Re: New spawn weapon option
Post by: Taristin on February 03, 2007, 04:10:37 pm
Awesome. :yes:
Title: Re: New spawn weapon option
Post by: NGTM-1R on February 03, 2007, 04:52:00 pm
Nice, I can make use of this.
Title: Re: New spawn weapon option
Post by: phreak on February 05, 2007, 10:29:43 pm
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"
Title: Re: New spawn weapon option
Post by: Zacam on February 06, 2007, 12:33:43 am
I think "inherit parent target" would be less confusing and easier to remember.
Title: Re: New spawn weapon option
Post by: Turambar on February 06, 2007, 01:42:56 pm
woohoo!

Battlestar Pegasus cluster rounds!
Title: Re: New spawn weapon option
Post by: Col. Fishguts on February 07, 2007, 06:14:36 am
Yay, HW2-style ship torpedoes :yes: