[Thread Prev] <
On 12 Nov 2007 at 11:36, askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> from: kendyl <kleasure@xxxxxxxxxxxxxxxxxxxxx>
> date: Mon Nov 12 11:36:53 2007
> platform: PC
> version: MicroWorlds Ex
>
> I'm trying to get my turtles to draw shapes at the same time. I've
> tried the super procedure
> but the comment is saying "I don't know how to t1 in superProcedure."
> the command I'm using is
> to superProcedure
> t1
> t2
> t3
> t4
> end
>
> is this correct? Also is this the same as a Master Procedure?
Hi Kendyl,
There are two different concepts:
FIRST CONCEPT
a procedure that calls another procedure is a super procedure.
For example:
to procedureA
fd 10
procedureB
end
to procedureB
rt 90 fd 10
end
the procedureA is a super procedure because it calls procedureB.
I guess that a procedure that is so important that calls many other
sub procedures in your project is a super procedure and is also
THE master procedure.
SECOND CONCEPT
Things can happen (almost) at the same time in MicroWorlds.
For that
you don't need many procedures, you need many processes. a process
it launched using one of this:
- clicking on a turtle
- using clickon
- using "launch"
- using "forever"
- using "when"
so you can make different turtles do things (almost) at the same
time using:
to procedureName
launch [tto "t1 blablabla]
launch [tto "t2 blablabla]
launch [tto "t3 blablabla]
launch [tto "t4 blablabla]
end
avoid:
to procedureName
tto [t1 t2 t3 t4]
blablabla
end
because this solution does not work on PCs running Microworlds Pro.
Daniel
OpenWorld Learning
Previous by thread:
RE: MIA, Ask an Expert: how to t1 in superProcedure
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.
|