Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
How do you stop a method?
Old
900qq
Guest
 
Status:
Posts: n/a
Exclamation How do you stop a method? - 02-11-2013, 03:44 PM

Hello alice community, I'm new to alice and I'm taking it as a math course. I'm making this program that would start as a menu, then the user would be able to select a character(object) and control it, after the character moves to the starting position of the race. However, my problem is that, I have animations(methods) for each character, so If i would select a character it would properly work and move to the starting position but, the animations are still running. I don't know how I would be able to stop the animations from running at the same time as the movement animations when the user is controlling the object. Your help would be much appreciated, thanks =)
Attached Files
File Type: a2w Nature Run.a2w (8.26 MB, 1 views)
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 02-14-2013, 03:59 AM

Quote:
Originally Posted by 900qq View Post
Hello alice community, I'm new to alice and I'm taking it as a math course. I'm making this program that would start as a menu, then the user would be able to select a character(object) and control it, after the character moves to the starting position of the race. However, my problem is that, I have animations(methods) for each character, so If i would select a character it would properly work and move to the starting position but, the animations are still running. I don't know how I would be able to stop the animations from running at the same time as the movement animations when the user is controlling the object. Your help would be much appreciated, thanks =)
A good way to "stop" a method from running in its tracks would be to place the whole method in a while statement. For example, for an event while W is being pressed, in the "During" block perform the method walkAnimation.
Also, if you would like it to return to the starting position, make use of the "After" block of the while statement
   
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.