Author Topic: child missiles do not play launchsnd /armtime not always respected?  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline Avatar

  • 26
  • Beet Taster
child missiles do not play launchsnd /armtime not always respected?
I'm using launcher 5.5e and fs2_open_3_6_12r_INF.exe at the moment for reference.

Anyhow. I've been unable to get my child missiles to play any sound effect designated as their launchsnd. For that matter, I cannot make the parent missile play its impactsnd on detonation unless that detonation occurs as the missile runs out of lifetime - detonationrange and detonationradius induced missile deaths do not play their impactsnd for me.

Some context: I have a long range missile that fires in multiple stages. The first stage is non-homing without any trail effects to move it away from the player ship. This also serves to let the player see the missile itself, briefly. Then the missile's engine ignites and it flies away. I've got all of that working more or less the way I want it (though it's still a bit glitchy), I'm hung up on the sound side of things.

Demo movie of the mission-specific armtime bug. Note that in this video, a different method (detonationradius=weaponrange and armtime=delay between launch sound and ignition sound) is used than originally described in the code sections below.

Parent Missile
Code: [Select]
$Name:                                 Spectre
$Tech Model: spectre.pof
$Model File: spectre.pof
$Mass:                                  20.0
$Velocity:                              120.0
$Fire Wait:                            1.0
$Damage:                              0
$Arm time:     1.35
$Detonation Range: 50.0
;;$Detonation Radius:     10000
$Armor Factor: 1.0
$Shield Factor: 0.75
$Subsystem Factor: 1.0
$Lifetime:                            480.0
$Energy Consumed: 0.0
$Cargo Size: 4.5
$Homing:                               YES
+Type:                              ASPECT
+Turn Time:                        2.5
+Min Lock Time: 1.25
+Lock Pixels/Sec: 35
+Catch-up Pixels/Sec: 70
+Catch-up Penalty: 12
+Seeker Strength: 5
+Target Lead Scaler: 0.2
$Free Flight Time:      1.25
$LaunchSnd:                            362 ;;93
$ImpactSnd:                            361
$FlyBySnd:                             -1
$Rearm Rate: 0.1
+Weapon Range: 10000
+Weapon Min Range: 500
$Flags:                                ( "player allowed" "Spawn Spectre_B, 1" "no dumbfire" "Bomber+" "in tech database" "no lifeleft penalty" )
$Icon:                                 iconPiranha
$Anim:                                 Piranha
$Impact Explosion: bomb_flare
$Impact Explosion Radius: 0
$Spawn Angle: 0
$Thruster Flame Effect: missilethruster03
$Thruster Glow Effect: missileglow03
$Thruster Glow Radius Factor: 2.0

Child missile:
Code: [Select]
$Name:                                  Spectre_B
$Tech Model: spectre.pof
$Model File: spectre.pof
$Mass: 20.0
$Velocity: 450.0
$Fire Wait: 6.0
$Damage: 500
$Damage Type:   AntiBomberCruiser
$Detonation Radius: 15.0
$Blast Force: 1000.0
$Inner Radius: 40.0
$Outer Radius: 250.0 ;;was 300.0
$Shockwave Speed: 0
$Armor Factor: 1.1
$Shield Factor: 0.75
$Subsystem Factor: 1
$Lifetime: 250.0
$Energy Consumed: 0.0
$Cargo Size: 6.0
$Homing: YES
+Type: ASPECT
+Turn Time: 3.0
+Min Lock Time: 1.5
+Lock Pixels/Sec: 70
+Catch-up Pixels/Sec: 120
+Catch-up Penalty: 15
$LaunchSnd: 361 ;;92
$ImpactSnd: 88
$FlyBySnd: -1
$Rearm Rate: 0.33
+Weapon Range: 12000
+Weapon Min Range: 1500
$Flags: ( "player allowed" "child" "Bomber+" "no dumbfire" "particle spew" "inherit parent target" )
$Trail:
+Start Width: 1
+End Width: 0
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 4
+Bitmap: beam-dblue
$Icon: iconTrebuchet
$Anim: trebuchet
$Impact Explosion: bomb_flare
$Impact Explosion Radius: 200.0
$Pspew:
+Count: 1
+Time: 1
+Vel: 0.0
+Radius: 1.25
+Life: 0.01
+Scale: 0.5
+Bitmap: missilespew01
$Thruster Flame Effect: missilethruster01
$Thruster Glow Effect: missileglow01
$Thruster Glow Radius Factor: 3.75
« Last Edit: April 23, 2012, 04:44:18 am by Avatar »

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: child missiles do not play launchsnd
Aah, that's some problem there. I don't believe there is a way to trigger a sound effect based on radius, except for flack weapons which seem to be ok with it. If you really want a sound effect, a workaround would be to set the impact radius to 0 and treat the weapon as a Piranha without a remote trigger. That probably defeats the purpose of your weapon though. Is the problem going from the second stange to the third stage?
 
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline Avatar

  • 26
  • Beet Taster
Re: child missiles do not play launchsnd
Er- if I gave the impression there's a third stage I apologize! I posted the code for the entire missile - less the flavor text and some of my comment'd out notes of course. That's all that's there; I imagine if you replaced the various nonstandard fx, sfx, and model files with stock stuff it should work.
(Though there is a three stage variant with the same problem - stage 1 is free floating, stage 2 is long flight to target, then separate into a shower of submunitions for a nice shotgun explosion - and since that is also triggered by radius, it also plays no sounds, grrrr....)

The problem with having it detonate to the second stage by timing out - like a synaptic or piranha - is that this is meant to be a standoff LRM with a 10 km range. You can't lock on with a missile unless the velocity times the lifetime > range to target, though, so if I keep it slow enough for a cinematic 1ish second drift away from the fighter before igniting it's not going to lock onto anything outside of about fifty meters.

The workaround I've been using is recording both the launch and separation sounds to one file that's played on launch of the parent - unfortunately, the timing of separation is a bit glitchy so I often get desync between the sound effect of separation and the missile's engine actually lighting up and taking off.

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: child missiles do not play launchsnd
If I understand you right, (getting tired here but gave your reply a skim), why not just mix both sounds together in one file? The stage breakoff and the ignition of the next stage? If you time it decently, people will probably hardly know the difference.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: child missiles do not play launchsnd
Timing should be able to be figured out based on some quick maths with the tables, no?

  

Offline Avatar

  • 26
  • Beet Taster
Re: child missiles do not play launchsnd
I've been using free flight mechanics - they guarantee that no matter what the missile will, during its quiescent phase, float in front of the ship and thus into the pilot's face. However, using free flight and detonationrange cannot give a consistent time, as free flight is 1/4th $velocity + ship's speed which varies from moment to moment - afterburner, ship model, backwards flight if the particular ship is capable of it.

Previously I'd used detonationradius+armtime, setting it so that once the armtime's 'grace period' had passed the target would be within the detonation radius and I'd have a functional kloodge, but I had encountered bugs with that where the second stage would trigger basically instantly on some missions, and work perfectly on others. As if my armtime was equal to zero.

*ponders*

Though when I put it that way, it sounds like a mission bug. I am having a hard time understanding how different missions - that load with no errors - could have functionality that would nuke armtime entirely.

Demo movie of the mission-specific bug. I grant you this means I should spend some time digging into the mission files, which I'll go do now.

To clarify: demo movie has the detonationradius / armtime method, not the detonationrange method in the code quotes from the first post. If it could be helpful I can post that code.
« Last Edit: April 23, 2012, 04:42:53 am by Avatar »