Alice Community  

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

Thread Tools Display Modes
walk with variable while moving
Posts: n/a
Default walk with variable while moving - 12-03-2006, 03:30 PM

hello, I am trying to get my final asignment done and I am having
so much trouble with this Alice, I have thought just saying the heck with it,
I am sooo frustrated with this.. If anyone can help, please...

I am trying to make a person(he-man build) to walk with built in walk
and also to move same time. The problem I am having is that when I create
a variable (while something is true) to up arrow and variable being true,
I cant get the person to walk and move at same time with out errors. Man, I
have tried so many darn times. I go to create an event, I choose while something is true and put the variable in there and the method of movement which I have move and walk in a do together block, I then go to while a key is pressed and I put the up arrow and the variable to set to true.
This should work, but its not. I just overall want to get a person to walk, move forward with up arrow and stop with down arrow (variable set to false).

PLEASE help as I am going crazy with this..
Reply With Quote
Doesn't work for me either!
Posts: n/a
Unhappy Doesn't work for me either! - 12-03-2006, 07:41 PM

Looks like a real bug - the attached always gives me an error when I release the up arrow key - and it's about as simple as code can be to do what you want.

The walk method works ok when I call it from something else but not when called from "while key is pressed." Also tried both regular and "slow and steady" Alice - no difference.

The error message is "index out of range" but I can't see anything that would cause that in the code.

Didn't see anything in the bug list that might apply except a note that "he/she builder poses are broken"????

Maybe someone else can see the problem.
Attached Files
File Type: a2w WalkTest.a2w (443.2 KB, 505 views)
Reply With Quote
Senior Member
Status: Offline
Posts: 110
Join Date: Dec 2006
Location: Earth
Default Fixed - 12-23-2006, 02:51 PM

Here is my working version!
Attached Files
File Type: a2w WalkTest.a2w (462.1 KB, 596 views)
  Send a message via MSN to zenteo  
Reply With Quote
Nice Work.
Posts: n/a
Exclamation Nice Work. - 01-02-2007, 12:02 PM

Nice work - your solution really works smoothly. Thanks!

I've been trying to figure out what the original problem was and am still not sure. If you have some more time, could you post a little more explanation of what you did.

In general, the problem seems to be that in the original, when the while event terminated, it left/set some loop index to an illegal value - but I can't figure out how or what index. This leads to the following questions:

1. When actually is the while conditional statement evaluated for an event?
2. Is possible to set the value of "elapsed time" and, if not, when is it reset? (It looks to me like this only occurs when you restart Alice.
3. Despite the cryptic comment in the "know bug" list, it doesn't look like the poses had anything to do with the original problem. Anyone agree/disagree?
Reply With Quote

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