Show and hide a sprite
Bind keys to show and hide to let the player toggle a spriteโs visibility.
whenKeyPressed("space", () => { hide();});
whenKeyPressed("up arrow", () => { show();});Pressing Space makes the sprite invisible; pressing Up brings it back.
Functions used
Section titled โFunctions usedโwhenKeyPressedโ run code when a key is pressedshowโ make this sprite visiblehideโ hide this sprite