Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

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

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Coding breakout paddle
From: "Daniel Ajoy" <da.ajoy@xxxxxxxxx>
Date: Wed, 14 Nov 2007 19:50:22 -0500
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;

On 14 Nov 2007 at 15:24, Doug Alexander wrote:

> to bounceLeftPaddle
> make "ballheading heading
> ifelse and (greater? ballheading 95) (less? ballheading 180)
> [ball, seth 90 - (ballheading - 350)]
> [ball, seth 90 - (ballheading - 45)]
> end

to get to the value of the variable with name ballheading you say:

:ballheading

so:

to bounceLeftPaddle
make "ballheading heading
ifelse and (greater? :ballheading 95) (less? :ballheading 180)
[ball, seth 90 - (:ballheading - 350)]
[ball, seth 90 - (:ballheading - 45)]
end

otherwise, if you just say:

ballheading

MicroWorlds thinks you are refering to the procedure ballheading,
or to the slider ballheading, or to the textbox ballheading, or to
the "project variable" (special kind of variable, that no one ever
uses) ballheading.

Daniel
OpenWorld Learning




  • Previous by thread: RE: Whack a mole
  • Next by thread: Operators

  • 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