[Thread Prev] <
On 4 Dec 2007 at 11:19, Russell, Ken wrote:
> Here is the wrong way to do it:
>
> to star :length
> repeat 36 [fd random :length bk random :length rt 10]
> end
>
> What I want to do is have the second random in the repeat procedure to
> be the same value as the first random value (so it would go back an
> equal distance as it went forward.
>
> It seems like the first fd random value would need to be stored and
> re-used as a value for bk.
>
> Is there a way to do this?
No. There are many, too many:
==================================
to star :length
star.auxiliary random :length
end
to star.auxiliary :random.number
repeat 36 [fd :random.length bk :random.length rt 10]
end
=================================
to star :length
make "random.length random :length
repeat 36 [fd :random.length bk :random.length rt 10]
end
=================================
to star :length
let [random.length random :length]
repeat 36 [fd :random.length bk :random.length rt 10]
end
=================================
create a slider called slider1
to star :length
setslider1 random :length
repeat 36 [fd slider1 bk slider1 rt 10]
end
=================================
instead of a slider use a textbox
=================================
Daniel
OpenWorld Learning
Previous by thread:
Storing a random value for re-use(?)
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.
|