Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Using Event "While a key is typed" with walking (http://www.alice.org/community/showthread.php?t=2767)

jessicaberger 06-12-2009 10:40 AM

Using Event "While a key is typed" with walking
 
1 Attachment(s)
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?

felixx24 06-28-2009 12:46 PM

Other Problems
 
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 "[I]SUBJECT[/I] is [I]THRESHOLD[/I] in [I]OBJECT[/I]" 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.


All times are GMT -5. The time now is 11:45 PM.

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