How do I make positioned sound in multiplayer game?

0 favourites
  • 3 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • I have a lot of players on big map. When player shoot other must hear if close to him. "Set listener" isnt helps correctly. Looks like listener always host screen. Any ideas?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Decide on a range for the sound to be heard. Create a circle graphic the size of the range of the sound and set it properties to invisible. Give it Fade behavior and set to active on start and destroy after fade out. Don't forget to set or check it's collision properties into the shape of a circle.

    Next set sound to play for players when they are on overlap with the circle.

    Then set the circle to be spawned from the point of the weapon or explosion or whatever makes the sound.

    If another player is close enough, the circle will overlap, the sound will play, the circle will be destroyed. The circle is always invisible.

    This the basic mechanic I use to trigger an action to based on range (short range anyway) without calculations. It's easier and more efficient than calculating ranges.

    Hope this helps

  • I have a lot of players on big map. When player shoot other must hear if close to him. "Set listener" isnt helps correctly. Looks like listener always host screen. Any ideas?

    This is interesting to think...

    I never tried this but I think you can calculate this on peer side, because this is not an authoritative case. Let the host sync the coordinate of all peer to everybody, so in peer event, calculate the distance based on sync coordinates, adjust the volume based on the distance. This is if you want to adjust the sound relational to position. If else, what TheDom said is totally a good way to do it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)