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 / [SOLVED] Entire sounds are playing with opposite condition than what I scripted?!

Author
Message
EonHet
User Offline
Joined: 14th Mar 2021
Location:
Posted: 17th Mar 2021 02:38
Hi, I'm a first time user of FPSC. Dove straight into the scripting documentation that Ched80 made and started trying stuff out... Geez So many of these actions don't seem to work on character entities I try them out on; mutate, lookatplr (and I get that the models themselves might be at fault?)

But the MOST important issue I'm having is with playing sounds!! I try it so many ways and it is not doing what I want!

So I set this script as a character entities main script;

state=0,plrcanbeseen: rotatetoplr,talk=(file path to .ogg)

The model rotates just fine when conditions are met but.. no sound... UNTIL I HIDE from the character! Once I am no longer within sight, then the sound plays. If I step back into view of the character, the sound stops.

I've used the talk, sound and music actions, with different soundscales and volumes, I've also done it like;

:State=0,plrdistwithin=200:state=1
:State=1: sound (etc)

But even keeping plrdistwithin in a state=0 script, the sound doesn't play until I have moved AWAY from the entity..

I've been hacking away at this for like 2 hours now, searched the internet and the forums for relevant issues.. nothing.

Can anybody tell me what is going on here?

The author of this post has marked a post as an answer.

Go to answer

ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Mar 2021 11:54 Edited at: 17th Mar 2021 11:55
EonHet Hi and welcome
Quote: "the models themselves might be at fault? "

You are correct, start by using a stock character. they have all the animation needed for stock scripts to work with.
Also make sure where you are placing the script for the character. ( Appear, the Main Ai, Death and shoot script )
Some scripts are intended only for a specific purpose ( a death script wont work as a shoot script, i think you get it ?)
Which version of fpsc are you suing, any mods? Have to installed dx9 yet? Important for dx audio to work porperly.

Take scripting the fpi language one step ata time. As in your upper script...state=0,plrcanbeseen: rotatetoplr,talk=x
Looks like you forgot a colon at the start at state=0 and you have a space. Try this...

Also have you tried .wav file?
Your second script appears to have a space at state=1. No spaces allowed.

Note: use audio files that are mono to start with, they seems to work best.
** WHERE'S MY eXplosys ? **
EonHet
User Offline
Joined: 14th Mar 2021
Location:
Posted: 17th Mar 2021 12:57
Hi ncmako, thank you for your reply.

To start with, my syntax in the actual script on my PC is fine, I'm typing this on my phone which is how mishaps made their way through

Also, I am using v120, with no mods. I have directx 10 installed, and so can't install directx 9. (And definitely dont want to get rid of 10, or I won't be able to play my modern games!)

I have tried with .wav files. It does the same thing, only difference is that the engine creates an .ogg file in the same directory, so having witnessed this I assumed it had to convert wav into ogg to play.

As far as the mono sound is concerned, I have used both mono and stereo sounds and they both have same effect.
EonHet
User Offline
Joined: 14th Mar 2021
Location:
Posted: 17th Mar 2021 17:22
To add to my reply, I should also mention that I did attempt this with a multitude of stock character entities as well.
ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Mar 2021 19:59 Edited at: 17th Mar 2021 20:02
EonHet Ok, your using V1.20 with no mods. Great. First, not knowing your rigs setup & graphics card, I would say it is important to first run a dx9 setup.
Look in your "tools" folder if you have directx setup of any kind. Fpsc is an older engine based on dx9. Yes you may have dx10 or higher, but there always
are little bugs that pop up with new users until they run the dx9 ( dx10 and higher have a few older files missing that are really needed on these old engines)
If you dont have/see a dx9 setup .exe let me know and I 'll point you to one. Upgrading does not remove dx10 or anything like that, only adds "missing" files
for a dx9 engine to use.

Secondly, yes, the engine converts .wav files to .ogg. NOT always, just most. You'll see in the audiobank character "voices" and gun/weapon file are not coverted.
Its the way the engine works.
If your really sure that the .wav files your using are mono ( have you tried a stock sound file if it works yet ?" as we know those do work )
then all i can say its a missing dx9 audio file.
Lets narrow down the problem/issue one thing at a time. We'll get it sorted out. Little bugs are common like this when first starting out with fpsc.

Last, do run your cleaner between any changes made. The engine like to hold on to things in memeory between test runs. So please run the cleaner
every time testing. Also note, if you make any changes to the setup.ini Fpsc MUST be closed before the changes take effect.
Pic attached of which cleaner to run/use.

Just thought of it, do your fpsc .exe's have admin rights? probably wouldn't matter, but ???
** WHERE'S MY eXplosys ? **
EonHet
User Offline
Joined: 14th Mar 2021
Location:
Posted: 17th Mar 2021 21:57
This post has been marked by the post author as the answer.
NcMako, thank you so much for your support!

I got it figured out!! From what I can tell, I have to change the state along with playing the sound. My suspicion is that, while the state remains the same, the command to play the sound is non-stop engaging, thus not producing any sound.

Ergo, while this;

:state=0,plrcanbeseen:talk=x

Did not work, THIS;

:state=0,plrcanbeseen:talk=x,state=1

Works!

Also, I have the installation exe for dx9, but running it always brings a message "direct x has detected a newer version, installation not required." And does not install. Aside from uninstalling dx10, installing dx9, and reinstalling dx10, I see no workaround. Although that is redundant imo, because this PC had dx9 before I Installed dx10.
ncmako
9
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Mar 2021 09:56
EonHet Glad you got it sorted out This is one of those little things thats helps you learn a little more
about fpsc. If your serious about Fpsc then you should consider joining us at Fpsc-Discord with tons of
members to help & discuss Fpsc mattes. https://discord.gg/5JbdxCzH
** WHERE'S MY eXplosys ? **

Login to post a reply

Server time is: 2021-09-24 19:19:47
Your offset time is: 2021-09-24 19:19:47