9 years ago by yhsper
Hi, everyone!
I'm new in this forum and new to ImpactJS. So far, it has been a blast working with the framework. Now I have a question:
Does the .volume property of a Sound object controls its volume for all channels?
What's happening in the game I'm making is that I have an Entity which is spawned more than once (in my case, enemies) and I wanted to control the volume of the sounds they make (steps, shots, etc.) according to the distance from the player's Entity.
What seems to be happening is that whenever I set the volume for the sound of each individual instance of the Entity (with
Am I doing something wrong?
Thanks in advance!
I'm new in this forum and new to ImpactJS. So far, it has been a blast working with the framework. Now I have a question:
Does the .volume property of a Sound object controls its volume for all channels?
What's happening in the game I'm making is that I have an Entity which is spawned more than once (in my case, enemies) and I wanted to control the volume of the sounds they make (steps, shots, etc.) according to the distance from the player's Entity.
What seems to be happening is that whenever I set the volume for the sound of each individual instance of the Entity (with
this.sound.volume = 1/(1+distance)
or something) all entities' sounds seem to be affected.Am I doing something wrong?
Thanks in advance!