Alice Community  

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

Thread Tools Display Modes
Soldier Marching
Posts: n/a
Red face Soldier Marching - 10-11-2011, 08:16 AM

I have got a lab exercise to do in , I've done it to some extent but I have got some questions.
Exercise: "Edit your marching soldier so that the number of steps he walks forward can be passed to the method using a parameter (Hint: you may have to have separate methods for the initial step and final step. The intermediate steps could be animated using a loop.)"
So I've got my soldier walking, however, one step is for him two, and I cannot make him take e.g. 3, 5 and odd number of steps. I used IF method to make him take one step if the number is 1, and else when the number is any other than 1. Is there any possibility to improve my programme?

I attach my Alice world.
Attached Files
File Type: a2w Marching Soldier.a2w (277.7 KB, 18 views)
Reply With Quote

alice, marching, numbers, odd, soldier

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