Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Spinning Character? (http://www.alice.org/community/showthread.php?t=12031)

jkidd 06-27-2018 06:49 PM

Spinning Character?
 
ey guys,

I have been working on having a character that asks the user for a number, which then causes the character to jump up, while using a loop to spin around the number of times specified, and then comes back down.

Once the Alice program has executed, the user is asked if they want it to run again. If they input "yes", it runs again. I am to use a loop to do this, so that it will run continually as long as the user keeps entering "yes" at the end.

Here is a screen shot of my method in Alice: [URL="https://image.ibb.co/eHYrvT/Cowboy.jpg"]https://image.ibb.co/eHYrvT/Cowboy.jpg[/URL]

This is my dilemma... Once I click "yes", it goes back to the character originally asking the user as to how many times that he should spin. Instead of repeating how ever many spins that I told the character to do.

What am I missing? Any advice would be great.

Thanks.

- jkidd

ag994 02-18-2020 07:08 PM

In order for me to be able to give you a definite response, i would need to see the sheriff.SheriffSpin method. Based on your original question though, it may seem that you have the first question (asking the user for the number) embedded within a loop in the sheriffSpin method. Based on the image you provided, it shouldn't ask for the user's number input again. But since we are missing information from the sheriffSpin method, it is hard to say.


All times are GMT -5. The time now is 03:21 AM.

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