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 / schrödingers cat box - problem

Author
Message
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 5th Oct 2012 14:49
Hi Guys, this may contain some spoilers for Into the Dark, but we ran into something dstrange during debugging.

We have a box that should meow as the player comes nearby, in three different version (depending on distance to player). Box is dynamic and visible, script is assigned, but it does nothing.

Code is:



Any idea?

Come to where the madness is:http://www.homegrowngames.at
Ross tra damus
3D Media Maker
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 5th Oct 2012 21:21 Edited at: 5th Oct 2012 23:43
Could it be a spelling mistake?
Sorry for being obvious but here you say 'meow' and in the script you say 'miau1.ogg'.

EDIT - Does the audio file have the correct spelling?
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 5th Oct 2012 21:32 Edited at: 5th Oct 2012 21:34
Quote: "Could it be a spelling mistake?"


Well the "state=6" lines definitely have spelling mistakes. It should be "plrdistwithin", not "plrdistwihin".

I'm not 100% certain, but it could be the fact that you are specifying distances to check and do things and the "etimers" at each location may be interfering. I would suggest scripting the box so when the player reaches the furthest distance you want play first sound; when second desired distance is reached, play second sound; if third distance is reached, play third sound. Once that works, then implement your extra checks (if player decides to turn around and move away, etc).


Twitter: @NFoxMedia
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 5th Oct 2012 23:38
Do you use fpi editpad?
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 6th Oct 2012 02:16
nope, I use notepad++

Come to where the madness is:http://www.homegrowngames.at
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2012 03:59
So am I to assume both Ross and I were unable to be of usage then?


Twitter: @NFoxMedia
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 6th Oct 2012 05:49
unfortunately, the cat is still silent.

Come to where the madness is:http://www.homegrowngames.at
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2012 06:06 Edited at: 6th Oct 2012 06:19
Another thought- did you try using different sounds (such as wave)? The reason I ask is we encountered a similar issue and I discovered it was the actual sound files (they were wave format). I had to change the bit rate and frequency of them before they would work. I'm not sure if the actual sound file is the issue, and the script syntax is correct, so it should work. Another idea to try- set the entity to "always active".


Twitter: @NFoxMedia
Ross tra damus
3D Media Maker
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Looking to Escape London
Posted: 6th Oct 2012 15:52
Ertlov

Something you could try is to 'include' the address's for the first 'two' audio files in the models FPE file in soundset 0 & 1 slots (script change to $0 and $1)and leave the third address as it is.

For 'short' audio FX I would use '.WAV' format:


For 'longer' audio FX (such as Music) I would use '.OGG' format:


Just another idea.
Wolf
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 6th Oct 2012 16:35
Hey Ivan!

Whenever this happens to me, my first clue is usually converting the sound files in .wav.

Its one of FPSC's little...very funny... querks to randomly deny playback of some .ogg files.



-Wolf

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2012 18:09
Quote: "Whenever this happens to me, my first clue is usually converting the sound files in .wav.

Its one of FPSC's little...very funny... querks to randomly deny playback of some .ogg files."


We experienced a similar thing. We had a "timer" sound when explosives are planted. The sound was real low and slow, but once converted to a proper format that Ross pointed out above, it was all good. Ertlov's script works (at least in my v1.17), so the sound is the only other thing I can think of that is giving him issues.


Twitter: @NFoxMedia
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 7th Oct 2012 03:27 Edited at: 7th Oct 2012 03:54
I have now assigned the script to another entitity (a switch) attached to the box and it works. With ogg.





Come to where the madness is:http://www.homegrowngames.at
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 8th Oct 2012 01:44
Quote: "I have now assigned the script to another entitity (a switch) attached to the box and it works. With ogg."


Is there something in the script that's different?
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 8th Oct 2012 10:54
may it be you now use a character, it could be that the voices-folder only is callable by character-entities.

what i also discovered in some moments is that space-lines between the states sometimes help with soundcommands to play. sounds strange, i know.

Login to post a reply

Server time is: 2024-11-23 19:27:38
Your offset time is: 2024-11-23 19:27:38