How to Keep Your gTheSoundFX from Interupting gTheMusic: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 1 revision imported
Andrew Branscom (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:SCI Pages]]
[[Category:SCI Pages]]
[[Category:Temp SCI Import Pages]]
[[Category:Temp SCI Import Pages]]
[[Category:Temp SCI Tutorials]]
[[Category:SCI Pages to be Edited]]
[[SCI Tutorials]]
[[SCI Tutorials and Guides]]


 
<div align="center"><span style="font-size: 22pt"></span>How to Keep Your gTheSoundFX from iInterupting gTheMusic><br />''By [[Shane Cloud]]''</div>
<div align="center"><span style="font-size: 22pt">How to Keep Your gTheSoundFX from iInterupting gTheMusic</span><br />
'''By Cloudee1'''</div>


<br />
<br />
Line 19: Line 15:
With this the soundfFX will no longer play until after the music has finished.  
With this the soundfFX will no longer play until after the music has finished.  


==<br /> References ==
<references />
==<br /> Related Links ==
* &nbsp;
&nbsp;
&nbsp;
[[Category:Audio]]
[[Category:Audio]]
[[Category:SCI Audio]]
[[Category:SCI Audio]]

Latest revision as of 16:13, 29 April 2025


How to Keep Your gTheSoundFX from iInterupting gTheMusic>
By Shane Cloud



Introduction

In the first room of my game has music playing as well as a repetitive SoundFX (water dripping) and every time it played it interfered with the music. First I tried playing around with a priority property, but nothing ever really came of that. Then I figured I would just make a timer and count down to when the music should be over but I didn't want to add any more than necessary to my main script. It turns out that both instances have a state property built in. Then it just became a matter of checking for 0.

Code:
(if(== (send gTheMusic:state()) 0) (send gTheSoundFX:number(15)loop(1)play()))

With this the soundfFX will no longer play until after the music has finished.


References



Related Links

  •