Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: MIA, Ask an Expert: Pong/Follow
From: askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 20 Sep 2010 08:48:33 -0600

This is an automatic message sent from the web form at:

from: Anonymous <swanson6748g@xxxxxxxxxxxxxx>
date: Mon Sep 20 08:48:32 2010
platform: PC
version: MicroWorlds Ex

I am currently in the process of creating a Pong-like game, with a 
computer-controlled paddle that follows the ball with not-exact accuracy. For 
example, if the ball moves up 4, the paddle only moves up 3, instead of 
insantly teleporting to the position. However, it seems the if function (might 
not be considered a function, I am too used to using lua) does not like the 
turtle's ycor as a value to work off of. 

Script in question:

to follow
wait 0.1
if t2's last ycor < last ycor [sety ycor + 1]
if t3's "ycor > ycor = true [sety ycor + 1]

  • Previous by thread: melodies I found
  • Next by thread: Re: MIA, Ask an Expert: Pong/Follow

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008