Imagine you have a few layers called background, groundDirt, groundStone, groundBrick, charSprite, hud.
Is there a way to do a “show all layers with ‘ground’ in the name”?
It’s either this or I’ll have to go through tons of actions or comparing with tons of events.
ShowLetters was a variable indeed. If you’re not familiar with variables, check this page
When you want to show all the ground layers, turn the variable to 1 and the snippet above will show them.
Then you need to make the same with variable = 0 to hide the layers if necessary.
We’re grouping layers under a single variable to avoid multiplying the events, then we’ll turn this variable to 0 or 1 depending on whether we want to see the group of layers or not.