====== Control ====== {{blocks:if.png |}}If block [[blocks:examples:if|*Example*]] ---- {{blocks:waituntil.png |}}Wait until condition is true ---- {{blocks:stop.png |}}Stop the script it is in from running. [[blocks:examples:stop|*Example*]] ---- {{blocks:stopall.png |}}Stop all scripts in project from running ---- {{blocks:repeat.png |}}Repeat loop a defined number of times ---- {{blocks:while.png |}}Loop while condition is true ---- {{blocks:for.png |}} Loop a defined number of times and supply the loop counter to blocks inside the loop (Click on {{blocks:i.png|}} to change its name)\\ [[blocks:examples:for|Example]] ---- {{blocks:range.png |}}Can be used as 2nd parameter in {{blocks:for.png|}} to change starting number... ---- {{blocks:range1.png |}}... and/or size of the step ---- {{blocks:wait.png |}}Used inside a loop to wait for screen refresh ---- {{blocks:wait2.png |}} Wait for a specific time period ---- {{blocks:animate.png |}}Loop forever but automatically wait for screen refresh at the end of each loop ---- {{blocks:whenspacebar.png |}}Run the following blocks when a key is pressed\\ [[blocks:whenspacebar|Example]] ---- {{blocks:broadcast.png |}} Send a message to all instances on the Stage. Start scripts that begin with a 'when I receive' hat that matches the message. The Go button broadcasts the message 'go' ---- {{blocks:broadcast1.png |}}Attach data to the broadcast ---- {{blocks:broadcast2.png |}}Aim broadcast at specific instance or list of instances ---- {{blocks:whenreceive.png |}}Run following blocks when broadcast message is received ---- {{blocks:whenreceive1.png |}}Access the data (if any) sent with the broadcast ---- {{blocks:whenreceive.png |}}Run the following blocks when instance is clicked ---- {{blocks:whendropped.png |}}Run the following blocks whe instance is dropped. ---- {{blocks:return.png |}}Return a value (used when defining own blocks as reporter blocks)