<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Sound Scripts]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=1066&amp;type=atom"/>
	<updated>2014-08-21T23:30:01Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=1066</id>
		<entry>
			<title type="html"><![CDATA[Sound Scripts]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=7227#p7227"/>
			<content type="html"><![CDATA[<p>I will update this post with a collection of sound scripts I am working on. </p><p>The first one I made was a script that plays a sound after a number of seconds. This script scared me, because you can&#039;t really anticipate the sound. </p><p>SoundOnTimer:<br /></p><div class="codebox"><pre><code>--TIME--

knock = getObject(&quot;Knock&quot;)
 i = 0

function soundOnTimer(seconds,sound)
    i = i + 1
    t = i/60
    
    if t &gt; seconds then
        playSound(sound)
         i = 0
    end
end

function onSceneUpdate()
        soundOnTimer(10,knock)
end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2014-08-21T23:30:01Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=7227#p7227</id>
		</entry>
</feed>
