[0.17.66] Beam sounds emanate from target, not source
Posted: Sun Aug 25, 2019 2:03 pm
A few months back I had a long PM conversation with someone who couldn't get beam sounds working for laser turrets. Nothing they did got it working, they claimed, but I wrote it off to being new to modding and asked them to ask the forums for help (they didn't).
I have had other conversations with people who are adamant that lasers don't have any sound at all. They do. It's right there in the vanilla laser beam prototype - but it's incredibly quiet in the original .ogg and then it's given a volume of 0.7 on top of that. I've given laser beams (imo) much nicer and louder sounds but noticed that whether or not the beam sound actually plays is still very erratic. Have finally figured out why.
It seems that the sound emanates from the beam target, not the source. You can't extend the audible_distance_modifier of a sound past 1, and in this case, that audible range is well below maximum laser turret range. So to hear the sound, you have to be in literal melee with the objects of the laser turret's attention, and it helps if the combat is taking place in a library and the biters are tiptoeing. This explains why you get to hear it quite often in god mode testing but much less often in real play.
You don't have any other options that I can find. Giving an electric turret a working_sound results in it playing the sound continuously, whether it's firing or not. Turrets do have a range of other sound parameters such as starting_attack_sound but these are only used by worms in vanilla and seem to be heavily geared towards projectile fire - in tests with a laser turret, the results were horrible. You don't seem to be able to put a sound in BeamAttackParameters despite it inheriting the sound property from BaseAttackParameters - it works for projectiles but not for beams.
So the sound has to be defined in the working_sound of the beam prototype and it's currently rigged so that you can't hear it in most normal game situations. In my view, the machine actually producing the beam should be the source of the sound so that it stands a better chance of actually being heard.
I have had other conversations with people who are adamant that lasers don't have any sound at all. They do. It's right there in the vanilla laser beam prototype - but it's incredibly quiet in the original .ogg and then it's given a volume of 0.7 on top of that. I've given laser beams (imo) much nicer and louder sounds but noticed that whether or not the beam sound actually plays is still very erratic. Have finally figured out why.
It seems that the sound emanates from the beam target, not the source. You can't extend the audible_distance_modifier of a sound past 1, and in this case, that audible range is well below maximum laser turret range. So to hear the sound, you have to be in literal melee with the objects of the laser turret's attention, and it helps if the combat is taking place in a library and the biters are tiptoeing. This explains why you get to hear it quite often in god mode testing but much less often in real play.
You don't have any other options that I can find. Giving an electric turret a working_sound results in it playing the sound continuously, whether it's firing or not. Turrets do have a range of other sound parameters such as starting_attack_sound but these are only used by worms in vanilla and seem to be heavily geared towards projectile fire - in tests with a laser turret, the results were horrible. You don't seem to be able to put a sound in BeamAttackParameters despite it inheriting the sound property from BaseAttackParameters - it works for projectiles but not for beams.
So the sound has to be defined in the working_sound of the beam prototype and it's currently rigged so that you can't hear it in most normal game situations. In my view, the machine actually producing the beam should be the source of the sound so that it stands a better chance of actually being heard.