Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / 3D / Positional sound question

Author
Message
doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 31st Aug 2012 05:42
Hi everyone,

I recall being able to use positional sound (a sound with a set source, so when the player turns their head, they can hear where it's coming from) with FPSC a while back, but I can't remember how to do it properly.

The manual speaks of 3D sound by using "3dsound=X" or "loopsound=X", but none of those seem to work. "3dsound=X" plays back no sound, while "loopsound=X" plays back sound, but it is not 3D.

I've ensured that the sound files are mono and I've played around with various exporting settings, but to no avail. I'm running FPS Creator version 1.19. If anybody could shed some light on this, I would be very grateful.

Thanks!

*This post will self-destruct in 10 seconds.*
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 31st Aug 2012 10:25
plrsound is set in standard-stereo, so "in the head" of the player.

using soundloop=x, sound=x etc. is set to the entity/zone wich its a part of, so the sound is placed on a specific point on the map.
you can edit soundscale=x to get a better effect.

look into cheds script syntax list to get all sound-commands and play with it. of course soundhandling in fpsc is some sort of 80´s flair, it far away from being up to date.

doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 1st Sep 2012 08:09
Thanks for your reply,

I've tried playing sounds via scripts ("loopsound=x") attached to specific entities, but it makes no difference. The sound plays, but it doesn't sound like it's coming from that entity - it just plays back on both speakers.

You mention "soundloop=x"...this is not a real syntax, is it? Do you mean "loopsound=x"?

I'm using mono .wav files, is there any other exported specification that is required (8-bit vs 16-bit, different codecs, etc.)?

*This post will self-destruct in 10 seconds.*
doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 2nd Sep 2012 22:37
Sorry for the double post,

Nobody has an answer? I've tried both .ogg and .wav files, but both do not work. In fact, when using a .ogg file, the sound doesn't even scale the volume when the player moves farther away, it simply plays the sound. With a .wav file, the sound scales as the player moves closer and farther, but the stereo imaging remains the same.

If it helps, I've included the script I use to trigger the sounds.

The object containing the sound script is activated using a trigger zone. The object's main script is:



I've also tried replacing the "$0" and "$1" with the file path to the sound, but that doesn't work either. If anyone could help me out, I would be extremely grateful.

*This post will self-destruct in 10 seconds.*
doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 14th Sep 2012 07:08
My apologies for the triple post!

If 3D positional sound is not possible, somebody please notify me so that I can stop trying to find a way. Searching the forums has been no help, and I would just like an answer.

Thanks again.

*This post will self-destruct in 10 seconds.*
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 14th Sep 2012 17:06
Maybe for 3d sound command to work you need multiple sound zones?
doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 15th Sep 2012 01:25
I don't think so, and I'm not using sound zones. I'm writing a script to play a sound and setting that script as the entity's main fpi. I have a feeling that for it to work properly, either:

1) The sound has to be a very specific file type

or

2) Maybe the command was broken since a certain FPSC update?

I've searched the forums and every official and unofficial document I could find, but I cannot figure out what it is. I swear I had this working a few years ago, but that could be a false memory.

*This post will self-destruct in 10 seconds.*
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 16th Sep 2012 02:07
I'm sure this is totally unrelated by maybe you need a 3d sound card?
cds1234
13
Years of Service
User Offline
Joined: 30th Apr 2011
Location:
Posted: 16th Sep 2012 11:11 Edited at: 16th Sep 2012 11:26
The 3dsound command doesn't work for me. For positional sound (sound in a 3d location that changes with distance and location in relation to the player) it has to be a mono file, and I think ogg or wav are fine and bit depth I believe can be 8 or 16 (16 ogg recommended from here)- use a high quality slow ogg render to get good sound).

There is a command that works in trigger zone that will loop with proximity from within zone. Can't remember which one, but can probably find it again.
kingofmk98
13
Years of Service
User Offline
Joined: 30th Jul 2011
Location: Everywhere
Posted: 16th Sep 2012 17:27

Try this. You have to add your sound in.

doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 16th Sep 2012 21:36
Thanks for the replies. Unfortunately, I am still unable to get this to work.

@kingofmk98: I could not get your script to work after including my sound into the script. However, I am able to get the "loopsound" function to work within other scripts.

I've tried exporting my sound in numerous different types of .WAV and .OGG files, and exporting from both Audacity and Mixcraft. However, it still does not work properly. The sound does get louder and quieter according to distance, but it does not go from speaker to speaker (or earphone to earphone) when the player moves around, so there is no way to tell where the sound is coming from.

I'm nearly at a loss here.

*This post will self-destruct in 10 seconds.*
doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 18th Sep 2012 23:54
Alright, so I will assume that FPS Creator does not support 3D sound at this time. The commands "sound=x" and "loopsound=x" play sounds, and the sound's volume changes depending on the player's distance from the sound source. However, the sound does not change speakers when the player rotates their head to let the player know where the sound is coming from (it's still MONO).

Thanks for everybody's advice, and I hope that anybody else wondering the same thing will find this post. I spent far too long trying to get this to work.

*This post will self-destruct in 10 seconds.*
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 19th Sep 2012 10:48
Quote: "I spent far too long trying to get this to work."


no you dont.^^ think of the hurray if it would have worked out, and maybe (ofcourse) a big hint for the next update.

doopus
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 27th Sep 2012 01:02
I just wanted to follow up on this post with some more findings:

After watching a few people play my FPSC game on YouTube, I've noticed that a smaller number of them indeed experienced 3D sound! I can only assume that FPSC handles 3D sound within the sound card or something...it's not software, but hardware-based. This would explain why only certain people are able to get it to work (and why I was able to get it to work on another computer).

It would certainly be helpful if FPSC handled 3D sound within the software itself (if what I've discovered is true).

*This post will self-destruct in 10 seconds.*

Login to post a reply

Server time is: 2024-11-23 20:02:29
Your offset time is: 2024-11-23 20:02:29