Alice Community How would you make an object walk forward 3 times with a loop count of 2?
 User Name Remember Me? Password

 Thread Tools Display Modes
 How would you make an object walk forward 3 times with a loop count of 2?
 Myo Guest   Status: Posts: n/a How would you make an object walk forward 3 times with a loop count of 2? - 05-14-2009, 03:58 PM I'm really confused since I don't even know what a loop does Please answer ASAP if you know what a loop does or if you know the answer to the quesition in the title! I'll greatly appreciate it Last edited by Myo; 05-23-2009 at 11:24 PM.
 Scott300 Senior Member   Status: Offline Posts: 80 Join Date: Feb 2009 Location: Ohio 05-14-2009, 07:02 PM var bool loopstop = false loop 2 times { if world.loopstop = false { Walk command 1 Walk command 2 loopstop = true } else { Walk command 3 } Something like this?
HisWorld
Guest

Status:
Posts: n/a
05-14-2009, 07:08 PM

Quote:
 Originally Posted by Myo I'm really confused since I don't even know what a loop does Please answer ASAP if you know what a loop does or if you know
some kind of school project?

So what have you tried so far? Have you completed the tutorial's?

Well all of your conditional statements are found on the bottom of the method pane.

One of these is called "loop" this is like a for-loop. All of the code inside the loop will be run from the first line to the last and then repeat a certain number of times based on what number you give it.

Inside the loop statement you will need the command to make your character walk forwards.

Everytime your code is run or looped your character will move forwards. To have pauses between each time he walks add a "wait"

Last edited by HisWorld; 05-14-2009 at 07:11 PM.

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge

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

 Contact Us - Alice.org - Archive - Top