SexScripts : Optional Sounds - https://ss.deviatenow.com:443/viewtopic.php?f=4&t=388 Page 1 of 1

Optional Sounds

CBT [ Wed Mar 19, 2014 9:03 pm ]

I am working on my first script, and I am wondering if it is possible to specify sound effects that will play if they exist, but are skipped (without error/notice message saying that the program cant find them) if the program cannot find them.

The script is based around you choosing a celebrity to be your mistress (or it will work with a named alternate/actual mistress or fetish model). I would like the script user to have the option of adding sound bytes of the celebrity to an extra folder in the scripts sound folder for added effect, but have the script run uninterupted if they cant find or dont want to find any that fit the script. I think that more often than not, the script will not be run with these extra sounds, as relavent sound clips will be hard to find on the internet, but I would like to offer the option without the user having to alter the script either way.

Any tips would be greatly appreciated

BTW, love the program, this is my first post but have been checking it put for about a month or two. Hope to have my first script up and running in the next week or two.

Re: Optional Sounds

doti [ Thu Mar 20, 2014 6:53 pm ]

This code should do the trick :
Code:
if (new File('sounds/xxxxx/yyyyy.wav').exists())
    playSound('yyyyy.wav')

Re: Optional Sounds

CBT [ Thu Mar 20, 2014 7:51 pm ]

Many Thanks

Page 1 of 1 All times are UTC + 1 hour [ DST ]
https://ss.deviatenow.com:443/
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010, 2011