Alice Community  

Go Back   Alice Community > Alice 2 > Bugs and Troubleshooting

Reply
 
Thread Tools Display Modes
Error in "While Key is Pressed" event
Old
Coolyoh
Guest
 
Status:
Posts: n/a
Default Error in "While Key is Pressed" event - 04-29-2009, 08:34 AM

I have a turtle. I have two "While a Key is Pressed" events set up so that when the up arrow key is pressed, the turtle preforms a walk method and also moves at a speed. This works fine, until I let go of the up arrow key. When I do this, alice encounters an "Error During Simulation." Is there any way I can fix this?
   
Reply With Quote
Old
pingu
Guest
 
Status:
Posts: n/a
Default 04-29-2009, 02:31 PM

i'm not sure, although i do have a hunch about what you've done... have you created a "begin middle end" key pressing event? you may want to make sure that there is no "nothing" in the options. sound's simple, but i overlooked it a couple of times too.

if that's not the case, then post your world and i'll see what I can do.

hope that helps,
Pingu
   
Reply With Quote
Old
HisWorld
Guest
 
Status:
Posts: n/a
Default 04-29-2009, 05:16 PM

From my small experience at Alice, you do not need to fill up all three of those categories, in fact most of the time I doubt you would want to.

Ex.
While pressing up key
turtle move forward at 3m per sec

You don't want anything happening special when it is first pressed or when it starts, however using those two methods would enable you to play with inertial ideas alittle easier......thinking maybe i could use that......

there could be a logical error on "while up key is pressed" if you have the object move for a longer duration than the key is pressed.

Some of Alice's logic is not always apparent without some tinkering.

edit
----------------------------------------------------------------
ok i have made a game using some inertia on my vehicles, occasionaly i get an outofboundsexception error.......

I hope i am not sounding like "look at me" but ive never seen an alice program except for mine that uses inertia like mine does, or allows the user to switch vehicles like mine does. Someone could defiently create some kind of grandtheft auto game with this.....haha maybe not a competitor but it could do the basics.
Attached Files
File Type: a2w finalproject7.a2w (2.09 MB, 28 views)

Last edited by HisWorld; 04-29-2009 at 09:08 PM.
   
Reply With Quote
Reply

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