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 / Questions about playing a .wav file as part of an entity "main" script

Author
Message
The 40 Year Old Gamer
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location: San Antonio
Posted: 14th Aug 2007 05:46
I've created a script which I know is being activated as I've done a few weird things with the hud - just to see something happen. My goal is to play a custom .wav file when the player approaches the NPC.

code snippet below.

;Triggers
:state=0:state=10
:state=10,plrdistwithin=60:rotatetoplr,sound=audiobank\dialog\test.wav,timerstart,state=20
:state=20,plrdistfurther=60:state=10
;End of Script

.wav file is in the correct path - "dialog" is a custom folder. i've moved it around to other folders to no avail.

I'm also having alot of permissions issues. I cannot change many of the folders from read only. They revert back after I close the properties.

Any help is appreciated.

'Yeah...I'm gonna' have to ask you to come in on Saturday. That'd be great.'
tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 14th Aug 2007 12:32
Most of that is correct, but I can't see the reason youve told the timer to start. You don't it back for anything in the script. Take that bit out and I think it will work. But I only had a 2 second glimpse at it.

Tyrano

TATBS 1.8 is now fully functional. Brilodis is having its districts extracted to Battle City. Krina and Karin are twice the size. And you’ll see 5 times as many breeds of monsters... It’s Kalspher V3.
The 40 Year Old Gamer
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location: San Antonio
Posted: 14th Aug 2007 16:36
T-Man,

thanks for taking a look. I removed the timer, but sound still isn't playing. I'm sure the script is executing so I'm thinking its something to do with the path to the file, permissions or the .wav file itself.

I did read another post that the .wav file had to be 8-bit mono, though it looks like that may not be the case with default audio files. Anyway - I changed the file to 8-bit and it still didn't work.

I welcome anyone's wild ass idea as to what might be the problem. Thanks.

'Yeah...I'm gonna' have to ask you to come in on Saturday. That'd be great.'

Login to post a reply

Server time is: 2024-11-23 20:18:42
Your offset time is: 2024-11-23 20:18:42