_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
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 _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Michael Rice-3
Sound interesting is the Etoys project posted anywhere?
On Thu, Apr 7, 2011 at 5:47 PM, michael rice <[hidden email]> wrote:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Michael Rice-3
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. On 08.04.2011, at 21:40, michael rice wrote:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Michael Rice-3
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners Etower1.001.pr (332K) Download Attachment |
In reply to this post by Bert Freudenberg
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
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:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Michael Rice-3
On 09.04.2011, at 13:28, michael rice wrote:
The Etoys way would be to do the red and blue actions in alternating ticks. E.g. However, the *real* Etoys way would be to let the Etoys objects do their work. Your approach is very procedural. It uses many variables and functions instead of objects. It even does the layout in code, calculating x,y coordinates etc. I am attaching a project that does pretty much the same as yours, but does not need a single variable, and has only 3 simple scripts with about 3 lines each. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Michael Rice-3
"action" is a script of the red and blue rectangles. You find it in the viewer's "scripts" category for e.g. the red rectangle. "player at cursor" is a tile of the "AllPlayers" holder. You find it in the viewer's "collections" category. (or type in the search box). Constructing a complex tile in Etoys goes from the concrete to the more abstract. You start giving specific instructions and then generalize. So at first, you place that "Red | action" tile in your script. Then you can test if that is working. Later, you replace the "Red" receiver tile with the "AllPlayers | player at cursor". You drag it from the viewer onto the "receiver pad" of the "Red | action" tile. Now, instead of always performing the "Red" object's "action", it runs the "action" script of whatever object is the current one inside of the "AllPlayers" holder. You have to make sure yourself that the objects in "AllPlayers" actually have a script named "action", otherwise an error will occur. The type system of Etoys only prevents that e.g. you drop a color where a number is expected. This "outside-in" construction of complex tiles works naturally when you "invent" the script yourself step-by-step by experimenting. When you only see the result, it can be perplexing how to construct it. The sequence is executed from left to right, but made from right to the left. That's why for arithmetic expressions there is the little "extend" arrow to the right (but you still need to build nested expressions outside-in). - Bert - On 15.04.2011, at 03:32, michael rice wrote:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On Fri, Apr 15, 2011 at 10:37 AM, Bert Freudenberg <[hidden email]> w=
rote: ... > Constructing a complex tile in Etoys goes from the concrete to the more a= bstract. You start giving specific instructions and then generalize. > So at first,=A0you place that "Red | action" tile in your script. Then yo= u can test if that is working. > Later, you replace the "Red" receiver tile with the "AllPlayers |=A0playe= r at cursor". You drag it from the viewer onto the "receiver pad" of the=A0= "Red | action" tile. ... > This "outside-in" construction of complex tiles works naturally when you = "invent" the script=A0yourself step-by-step by experimenting. When you only= see the result, it can be perplexing how to construct it. The sequence is = executed from left to right, but made from right to the left. That's why fo= r arithmetic expressions there is the little "extend" arrow to the right (b= ut you still need to build nested expressions outside-in). This outside-in method, as well as the ability to send a message to all players in a collection, are important tools for advanced tile scripts. Do we have a tutorial covering this in the Squeakland documentation? If not, I suggest we use Bert's scripts and explanation as the basis for the first draft. David _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |