Alice Community  

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

Reply
 
Thread Tools Display Modes
While Question
Old
Matchewawa
Member
 
Status: Offline
Posts: 32
Join Date: Feb 2011
Default While Question - 04-01-2011, 12:07 AM

In newer versions of Alice, can whiles cut of a method from running mid-method once their function is no longer true? Or does it have to let the method (that is happening as the function is "untrued") finish like Alice 2.0?
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 04-01-2011, 06:01 PM

you mean like a "break" or "continue" statement where the while loop either (1) terminates or (2) breaks out of the current iteration and goes back to the top? I know Alice has a seldom used property in each object called "eventsStopAscending" but I don't know how to use it or if that would help with this situation.


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
What I mean
Old
Matchewawa
Member
 
Status: Offline
Posts: 32
Join Date: Feb 2011
Default What I mean - 04-02-2011, 02:54 PM

What I mean, to be clear, is that if it were playing a long sound file like music or something, could the sound be stopped in the middle of playing once the function is no longer true?
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-02-2011, 06:50 PM

Quote:
Originally Posted by Matchewawa View Post
What I mean, to be clear, is that if it were playing a long sound file like music or something, could the sound be stopped in the middle of playing once the function is no longer true?
yea just use a boolean variable,
while Boolean is true
play sound
(make sure while is in a loop infinatly)

Then make an event like:
if 's' is typed do boolean set value to false
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 04-03-2011, 03:40 PM

Oh ok. I don't like dealing with sound since it tends to be buggy in Alice. Hopefully nickster's advice will help you.


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.