[Newbies] Re: Randomness + Pause/Delay?
Bert Freudenberg
bert at freudenbergs.de
Sun Apr 10 17:49:38 UTC 2011
That just freezes the world during the path following. Which I would consider a bug - in the Etoys image, path following happens simultaneously with all other animations.
Adding such a delay would be trivial, just have a textual script with something like "(Delay forSeconds: 1) wait". But that would not be a substitute for a real "wait" tile. It does not just stop the script it is in, but *every* script in the whole system.
- Bert -
On 10.04.2011, at 16:34, michael rice wrote:
> Delay can be accomplished with "follow path."
>
> 1) Put an ellipse morph at 100 at 100
> 2) Give it a path from present location straight up to top of screen.
> 3) Create script named "delay" for ellipse
> Ellipse do menu item follow existing path
> Ellipse x <- 100
> Ellipse y <- 100
> 4) Put a rectangle morph at bottom center of screen
> 5) Create script for rectangle
> Ellipse delay
> Rectangle forward by 5
>
> Click on ! to execute rectangle script. Ellipse follows path and returns to 100 at 100, delaying move of rectangle.
>
> Michael
>
> --- On Sat, 4/9/11, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> From: Bert Freudenberg <bert at freudenbergs.de>
> Subject: Re: [Newbies] Re: Randomness + Pause/Delay?
> To: "A friendly place to get answers to even the most basic questions about Squeak." <beginners at lists.squeakfoundation.org>
> Date: Saturday, April 9, 2011, 6:33 AM
>
> Well, often in Etoys you need a slight shift in perspective to make the solution fit a lot better. Approaches from other systems do not always map well.
>
> E.g., a typical approach to implement PacMan would be to have PacMan object with a script to eat peas. In Etoys it's a lot easier for each pea to have a script checking if it was eaten.
>
> So if you could let us know, in high-level terms, what the intended behavior is, we might be able to come up with ideas how to do that in Etoys.
>
> - Bert -
>
> On 08.04.2011, at 21:40, michael rice wrote:
>
>> Thanks.
>>
>> One forgets it's not a real-time simulation.
>>
>> Michael
>>
>> --- On Fri, 4/8/11, David Corking <lists at dcorking.com> wrote:
>>
>> From: David Corking <lists at dcorking.com>
>> Subject: Re: [Newbies] Re: Randomness + Pause/Delay?
>> To: "A friendly place to get answers to even the most basic questions about Squeak." <beginners at lists.squeakfoundation.org>
>> Date: Friday, April 8, 2011, 2:01 PM
>>
>> On Thu, Apr 7, 2011 michael rice wrote:
>>
>> >
>> > But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously.
>> > Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified
>> > number of ticks? If not, are there any plans for one?
>>
>> I saw these two posts last year. They might help:
>>
>> http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
>>
>> http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20110410/1e1d9605/attachment.htm
More information about the Beginners
mailing list