ScratchData LogoScratchData
Back to geek62's profile

SlideSwitch component

GEgeek62•Created February 7, 2024
SlideSwitch component
10
7
44 views
View on Scratch

Instructions

This gives you an easy(ish) way to add switches to your project. See the comment at the top of the SlideSwitch sprite for the API docs. ------ Original Instructions by trigophers: ------ I hope the sound effect isn't super weird, I know it could be better though I'm not totally satisfied with the quality, but I'm not an artist and I made it in the scratch vector editor so.. it's alright!

Description

When I saw trigopher's beautiful UI, I couldn't help but think it needed to be a "component". So here it is. If you just need one switch, trigopher's project will do it just fine. But if you want more switches without making a bunch of new sprites, the component is the way to go. A component is a single sprite which uses helper clones to do all the various stuff that needs doing. You control it by variables and events, and you don't need to worry about how all the innards work. This project also includes a "test app" sprite, which is meant as an example of how your scripts can do stuff with this component. One little fix was to get rid of the "forever" loops - you don't want every component in your project sucking up CPU cycles when it isn't really doing anything, especially when each one might be made of several helper clones. #component #switch #slideswitch

Project Details

Project ID962989064
CreatedFebruary 7, 2024
Last ModifiedMay 5, 2024
SharedApril 9, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root