[Thread Prev] [Thread Next]
Hello Alain!
Thanks about your clear and detailed answer.
Zehava
Alain LCSI <alain@xxxxxxx> wrote:
Helllo!
Here goes:
setpos sentence random 100 random 100
That will set a position between [0 0] and [99 99]
Sentence will take the two numbers generated by the two random instructions
and create a "sentence" with them. A sentence is a list.
If you need numbers between specific values, consider:
setpos sentence (-100 + random 201) (-100 + random 201)
Random 201 will give you a number between 0 and 200... therefore, -100 +
that will give you a number between -100 and 100
Play with these instructions, change the values, you will figure out what
does what.
Bye!
Alain Tougas
alain@xxxxxxx
B: (514) 939-8700 poste 237
Le 07-01-06 à 04:36, zehava wizman a écrit :
Hello Forum!
first of all, thanks about your quick and useful answers to my problems.
Another 2 questions:
1. How can I used random with setpos instruction?
I tried to write some version like setpos [random 200 random 190],or to make
"x random 200 make "y random 190 ,and then setpos [:x :y].
2. How can I limit all my turtles to move only between some values of the
screen?
thanks, Zehava Wizman
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Previous by thread:
Re: position with random coordinates
Next by thread:
Re: position with random coordinates
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.
|