View Single Post
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-01-2009, 05:33 PM

Oh yeah. I was hoping you'd see what I did the the forward method and reproduce it when you made the other three directions' collision detection checkers.

You see, the error (which will probably happen to everyone) comes from ending an animation from inside an event by letting go of a key. For some reason, though, it works fine if you use booleans, like upHeld, to trigger and end the animation. For your forward moving method, there was a command for the cube to move for 100000 seconds (or something similar). This is the animation that was ended from inside the event, generating the error. I replaced the method calls in the events with boolean variable changes, which allows you to make the other three directions error-free as well, once they are made. Until then, all it will do is change the respective variables to true while held, and false when released.

Take a look at the moveForward method to see what I mean.

(EDIT: I re-dowloaded your to be sure, but yes, the error is still there. It happens to all "While a key is pressed" events which cut long animations short.)

(EDIT again: You can speed up the motion by changing the meters value in the moveForward method from .05 to something larger, like .1)


(')>

Last edited by x2495iiii; 12-01-2009 at 05:40 PM.
   
Reply With Quote