[Thread Prev] [Thread Next]
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.
|