• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Can't select 3D sound for some reason. Please help.

Status
Not open for further replies.
Level 3
Joined
Aug 22, 2009
Messages
27
Okay so, I imported my sound file as WAV and included it in the sound editor as sound and when I try to click the "SD Sound" option, I can't, because it's grayed out.

2Usnv.png


I can, however, check the option with an .mp3 file, but when it plays in-game it plays as a normal sound, not a 3D sound.

Please help.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Okay so, I imported my sound file as WAV and included it in the sound editor as sound and when I try to click the "SD Sound" option, I can't, because it's grayed out.

2Usnv.png


I can, however, check the option with an .mp3 file, but when it plays in-game it plays as a normal sound, not a 3D sound.

Please help.

Turning Sound into 3D Sounds

This might help youn solving your problem!:thumbs_up:
 
You may want to consider using my library. I made it specifically for these kinds of problems so you don't have to go through the hassle of modifying it:
Simulate 3D Sound

It basically means you can play a regular sound (without 3D sound checked), but play it as if it is a 3D sound. Here is an example in GUI:
  • Set TempSound = MySound <gen>
  • Set TempUnit = (Triggering Unit)
  • Set MinDistance = 800
  • Set MaxDistance = 3000
  • Set DistanceCutoff = 3000
  • Custom script: call BindSoundToUnit( udg_TempSound, udg_TempUnit, udg_MinDistance, udg_MaxDistance, udg_DistanceCutoff )
You need a sound variable named TempSound, a unit variable named TempUnit, and three real variables: MinDistance, MaxDistance, and DistanceCutoff.

To use my script you need Jass NewGen Pack and TimerUtils. You can see the test map. Try it out and see if it works for you. I know it might seem like a lot of work but IMO it is better than dealing with 3D sounds regularly.
 
Elaborate please. Information about sound/music is more useful than a finished system.

These are the ones that work for 3D only:
JASS:
// these calls are only valid if the sound was created with 3d enabled
native SetSoundDistances            takes sound soundHandle, real minDist, real maxDist returns nothing
native SetSoundConeAngles           takes sound soundHandle, real inside, real outside, integer outsideVolume returns nothing
native SetSoundConeOrientation      takes sound soundHandle, real x, real y, real z returns nothing
native SetSoundPosition             takes sound soundHandle, real x, real y, real z returns nothing
native SetSoundVelocity             takes sound soundHandle, real x, real y, real z returns nothing
native AttachSoundToUnit            takes sound soundHandle, unit whichUnit returns nothing

Which is already known. For regular sounds, the native SetSoundPlayPosition doesn't work with 3D sounds (as far as my tests show, and in accordance to the GUI note that says not to use it with 3D sounds).

I haven't tested every native with 3D and non-3D though.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
These are the ones that work for 3D only:
JASS:
// these calls are only valid if the sound was created with 3d enabled
native SetSoundDistances            takes sound soundHandle, real minDist, real maxDist returns nothing
native SetSoundConeAngles           takes sound soundHandle, real inside, real outside, integer outsideVolume returns nothing
native SetSoundConeOrientation      takes sound soundHandle, real x, real y, real z returns nothing
native SetSoundPosition             takes sound soundHandle, real x, real y, real z returns nothing
native SetSoundVelocity             takes sound soundHandle, real x, real y, real z returns nothing
native AttachSoundToUnit            takes sound soundHandle, unit whichUnit returns nothing

Yeah, but in contrast to SetSoundPlayPosition for example, those functions do not have any meaning for non-ambient sounds in the first place.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I have not referred to your system but one of your introductory statements is that some functions would not work with 3d sounds (which is why you rather pick non-3d sounds). So I asked for what kind of quirks Blizzard fabricated regarding this topic. Desiring to be able to set the play time offset makes sense but the other functions you posted are specially made for 3d-sounds and it's obvious they would work only with them -> they pose no restriction.
 
Well, it comes down to semantics at that point. I think I understand what you mean—non-3D sounds are not supposed to use natives meant for 3D sounds. Therefore you are suggesting they pose no restriction.

I agree. It is just an issue of wording then. I meant it just a segue into the system, to say that it will establish a compromise to get the features of both types (non-3D and 3D). I'll fix it.

But anyway, since I said what my statement implied, I suppose this is settled?
 
Status
Not open for further replies.
Top