Alice Community  

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

Thread Tools Display Modes
Using Event "While a key is typed" with walking
Posts: n/a
Default Using Event "While a key is typed" with walking - 06-12-2009, 11:40 AM

Using Alice 2.2, I want a walking character to be controlled by the arrow keys. I created a new event that was "When a key is typed." When the left and right keys are typed, I have the object turn left and right. When the up key is typed, I have the object walk forward howFar=2. This also works. I also created a backward walking method by changing the "move forward" to "move backward". So far so good.

However, I right-clicked on each event and changed them to "While a key is pressed" because this is what I really want. The left and right turning still work fine but for the forward and backward walking, there is a problem. It works as long as you keep holding down the key but as soon as you let go, I get a message that there was an error in the simulation.

I have tried this with the walking Zeus and walking Cowboy. I got the same error for both characters. Attached is a simple world showing what I mean.

Any ideas?
Attached Files
File Type: a2w Cowboy Controls.a2w (987.6 KB, 30 views)
Reply With Quote
Other Problems
Posts: n/a
Cool Other Problems - 06-28-2009, 01:46 PM

I know that, I've got the same problem. I think Alice can't set a pose (in the walk-method) and move both. But (if I remember right) It works if you program the walk-method new and intigrate the move-command or if you make a other event "let the control keys move...".

My problem is too: I want to make that the person in my game doesn't can go through walls and other objects...
I made a event with "when something is true..." and "SUBJECT is THRESHOLD in OBJECT" and made some invisible shapes to "Blockers" and place them in a "Blocker-Group", but that is really difficult. Do you know an easier method? I don't know how I can create subgroups, does anybody know that? or manipulate Subparts? How can I roll Objects in the Layout Tool? Why objects can't resize only depth, height, width?
I think Alice 2.x is better than Alice 3, because it's easier to use, but this little things are not so good. I wish me an Alice 2.3! And if Alice will be perfect, it has got his own texture and object editor.
Reply With Quote

alice 2.2, error message, events, walking

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.