Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
how do I stop sound?
Old
the almighty bob
Guest
 
Status:
Posts: n/a
Default how do I stop sound? - 10-30-2006, 11:45 PM

I'm making a little game, and I would like to be able to stop and switch the song by pulling a lever. Can someone explain how I would go about doing this?
   
Reply With Quote
Old
thetrippster
Guest
 
Status:
Posts: n/a
Default 10-31-2006, 07:55 AM

umm if and else could be used or variables work.....but im not to great with them yet. im still learning.
   
Reply With Quote
Old
Shadow Sovereign
Guest
 
Status:
Posts: n/a
Default 10-31-2006, 07:58 AM

Ditto.
   
Reply With Quote
Old
Kirbya
Guest
 
Status:
Posts: n/a
Default 11-04-2006, 06:30 PM

I've tried several different things and I can't figure this out either..
   
Reply With Quote
Sound on and off
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Sound on and off - 11-04-2006, 07:42 PM

From an outsider's point of view, all Alice seems to do is retrieve the sound file, set a time limit on it and send it to a sound card - a very reasonable approach considering the variations on audio hardware around. (I thought the Dunn, et al, text even specifically recommended using an external sound editor but I can't find the reference on a quick look.) Once you start playing a sound, it plays to the "end" (either the actual end or the end set with the call) and you can't turn it off.

Thus if you want to switch a background song off and on, you need to use a small, repetitive sound segment (2-3 bars to one verse) - use the "Sound Editor" that comes as a Window's accessory to get something useful - and put the segment into a While loop, event call or something similar. The segment will just keep repeating until the test condition goes false.
   
Reply With Quote
stop sound
Old
Jordan906
Guest
 
Status:
Posts: n/a
Default stop sound - 03-07-2009, 09:55 PM

1st-You Have to make a variable "StopSound" and set its value to the length of your sound
2nd-drag the "StopSound" variable to the duration of your sound
3rd- Make a method that will set the value of "StopSound to 0"

and there you go. you can set the method in an if/then, a while, when a key is typed ect...
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.