January 17, 2017

Handy Scripting Support Tools


The Players Tool and the All Scripts Tool


Project Displaying Players and  All Scripts Tool
When you open the Players tool you can see all of the player objects in your project. Start a new project, drag out the players tool and an object. The Players tool is likely empty at this point. Right click on your object and open a viewer and the object and the dot object should appear. Whenever a viewer is opened on a new object, the object will appear in the players tool. From the Players tool, you can open viewers, find missing objects, get reference tiles and other options.

The All Scripts Tool can be used as a control for scripts set to pause or ticking or it can be expanded by clicking the right arrow to display all scripts. By default only ticking or paused scripts are displayed for objects but unchecking the tickers only box displays all scripts. If you have sibling copies in your project you may want to uncheck all instances before you do or it will list scripts in every copy. Hovering over the scripts object name gets a menu of options for that object. The step button allows you to run paused scripts one tick at a time. Use variable watchers as a debugging aid. Clicking on the question mark opens a help flap.


Connectors


Flow Chart Image
Objects from the catalogue's Connectors category can be used to create diagrams and user interface elements although you will likely find other uses for some of them. Etoys objects (including connectors and lines) have connector pins embedded around their perimeter . Connector objects  look like lines. When one of a connector's endpoints touches another object, that object's connection points become visible. The connector will automatically snap to a connection point. Which point is determined by the location of the other endpoint so if you are not happy with the connection just drag around the other endpoint. When the object is moved, the connected end point moves with it and the line will stretch. Connecters can be bent or curved and display control handles. To remove a connector from an object, left click on the endpoint and drag it away. When an object has a connector attached a new viewer category, connections to me, opens containing tiles to call scripts in connectors and directly connected objects. Multiple objects can be connected in this way. If you are working on a complex project, the connector tools are great for setting up diagrams to visualize script logic. Objects in the Connectors category are also entertaining to play with.




Last Updated.