Trying to get and object to move back and forth in etoys. Something simple like: forward 50 forward -50
It appears to do nothing. When I go to the code level and add a wait:
forward 50 (Delay forSeconds: 1) wait forward -50 (Delay forSeconds: 1) wait.
Still nothing. Any ideas what I am doing terribly wrong?
-david-
Have you started the script ticking (clicked the little clock icon)?
On Mon, Apr 14, 2008 at 2:00 PM, David H. Shanabrook dhshanab@acad.umass.edu wrote:
Trying to get and object to move back and forth in etoys. Something simple like: forward 50 forward -50
It appears to do nothing. When I go to the code level and add a wait:
forward 50 (Delay forSeconds: 1) wait forward -50 (Delay forSeconds: 1) wait.
Still nothing. Any ideas what I am doing terribly wrong?
-david-
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
David H. Shanabrook wrote:
Trying to get and object to move back and forth in etoys. Something simple like: forward 50 forward -50
It appears to do nothing. When I go to the code level and add a wait:
forward 50 (Delay forSeconds: 1) wait forward -50 (Delay forSeconds: 1) wait.
Still nothing. Any ideas what I am doing terribly wrong?
-david-
Etoys does a little optimization behind the scenes and batch screen update in each "tick" of a script together, so the result is no movement. You can try to do this:
Player forward 50 Player heading increaseBy: 180
or use a test tile and a boolean variable:
movedForward true: Player forward -50 movedForward := false false: Player forward 50 movedForward := true
Karl
beginners@lists.squeakfoundation.org