Creating "commands" for Etoys
arning at charm.net
Fri Mar 23 04:09:56 UTC 2001
On 22 Mar 2001 18:29:44 -0700 J Scott Jaderholm <scott at jaderholm.com> wrote:
>Ok, there must be a way to do this then without creating my own
>commands, but I don't know how.
>I have three SketchMorphs named Moon, Earth, and Sun. I want the Moon
>to revolve around the Earth, and the Earth to revolve around Sun.
>I was going to make a command that would change the moon's X,Y based on
>the Earth's X,Y, but if I can't create commands that's not really an
>I guess there's a better way to do this using the commands we already
>have..any ideas what that way is?
WRT the positioning of one morph relative to another, check out threeBodyExample on the BSS. This fakes the celestial mechanics in order to keep the math to a minimum.
WRT better celestial mechanics within the constraints of EToys, check out OrbitBob2.
>Btw, I call these commands since the tooltip says "Run this command
>once" and they appear to be different from scripts. Is there a better
Command is fine. I just wanted to be clear that you were talking about the simple naked commands in the viewer which have a yellow exclamation vs. the scripts (either in the script section of the viewer or out in the world) which also have a yellow exclamation.
More information about the Squeak-dev