Page 1 of 1

Random sounds

PostPosted: Tue Apr 01, 2008 8:23 am
by D'Lanor
Cyan uses sounds which play randomly. You can usually recognize these by "Random" or "Rand" in their filenames. And no, that is not a reference to Rand Miller ;)

Now PyPRP has this sound flag: - incidental. Is this what should be used for random sounds?

I tried the following flags on my sound emitter:
Code: Select all
- incidental
- autostart
- localonly
- is3dsound

That did not work though. It plays fine however if I replace incidental with looping so I know I set up the sound correctly.

I also tried the combination incidental and looping but then it just loops continuously.

I could set this up in python but I would like to know if there is an easy way before I attempt anything like that. So can it be done with sound flags?

Re: Random sounds

PostPosted: Tue Apr 01, 2008 12:20 pm
by Tsar Hoikas
AFAIK, the random sound support has not been implemented... They're a bit... different... from conventional sounds.

Re: Random sounds

PostPosted: Tue Apr 01, 2008 3:14 pm
by D'Lanor
Ok thanks. The Python way went fine btw. I used the Bahro scream method, but hardcoded the chance value instead of taking it from an SDL.

The hardest part was finding an Alcscript to pass the sound responder to a Python file. I don't think I did that properly but it works.

Re: Random sounds

PostPosted: Wed Apr 02, 2008 11:02 am
by Tsar Hoikas
I don't blame you for using python on random sounds... I'm not too sure I understand how the devil Cyan does random sounds.