How to add charging sound to Laser Turrets
Posted: Thu Jan 08, 2015 8:27 am
I managed to find some sound files from the original Command & Conquer, from way back in my childhood. One of the iconic buildings in that game was the Obelisk of Light, a giant laser turret with a very memorable sound. I thought it would be fun to change Factorio's laser turrets to sound the same.
It was pretty easy to change the sound element of the laser turret's attack_parameters, and it works well. I've also changed the attack cooldown to be much slower, which better reflects how the Obelisk behaved. So far so good.
The Obelisk also had a distinct sound while it recharged, and I'd also like to implement that in Factorio. I remembered that the Basic Accumulator has a charging sound and looked in the base prototype to see how it was defined. It looks like this:
I had hoped that if I simply added a working_sound element to the laser turret, then I could add the Obelisk Charging file either as the main sound or the idle_sound. Sadly this does not appear to do anything.
Is it possible to do this?
EDIT: I decided to add a launch sound to the rocket launcher, but it isn't working either. Can anyone see what I'm doing wrong?
It was pretty easy to change the sound element of the laser turret's attack_parameters, and it works well. I've also changed the attack cooldown to be much slower, which better reflects how the Obelisk behaved. So far so good.
The Obelisk also had a distinct sound while it recharged, and I'd also like to implement that in Factorio. I remembered that the Basic Accumulator has a charging sound and looked in the base prototype to see how it was defined. It looks like this:
Code: Select all
working_sound =
{
sound =
{
filename = "__base__/sound/accumulator-working.ogg",
volume = 1
},
idle_sound = {
filename = "__base__/sound/accumulator-idle.ogg",
volume = 0.4
},
max_sounds_per_type = 5
}
Is it possible to do this?
EDIT: I decided to add a launch sound to the rocket launcher, but it isn't working either. Can anyone see what I'm doing wrong?
Code: Select all
table.insert(data.raw["gun"]["rocket-launcher"].attack_parameters, {sound =
{
filename = "__rocketsounds__/sound/rocket 1.wav",
volume = 0.8
}
})