Tutorial: Layers and Events-My favorite post-launch addition to Mario Maker was the pink coins that would spawn a key when they were all collected. Good news, we can do this - and quite a bit more! - with the Layers and Events systems.
-I made a video a while ago to show this off.
-First, we'll do "Collect all the red coins to spawn a key".
-Make sure you have both the Layers and Events windows open.

-Click "Add" in the Layers window, and name your new layer "Red Coins" (the layer name can be anything, but it's good to be descriptive).
-In the Classic Events window, click the plus sign to add a new event. Name it something like "Red Coins Collected".
-Next, place some Red Coins in your level. Select them, and use the right-click menu to change which Layer they're assigned to.
Blocks, BGOs, and NPCs can all be assigned to layers. You can use layers to put multiple blocks or NPCs in the same tile, though the graphics can render strangely depending on how this is done.-Still having all your Red Coins selected, right-click and go to Properties.
-The four drop-downs at the bottom of this window allow you to configure the coins as an Event trigger.
-In this case we want to set "Layer is empty" to trigger the custom event we created.

-Next, we'll need a Key that's in a separate layer. Place a Key in your level, and from the right-click menu select "Add to new Layer..."
-Check the box for "Hidden", since we don't want the key to be visible to the player initially.

-You'll actually see the key disappear in the editor, but if you need to see it again, you can toggle the layer visibility with the checkbox in the Layers window.

-Now that both layers are configured, select your Red Coins Collected event in the Events window. Under "Layer Visibility", add Key to the Show field. Like this:

-That's all you need to do for a functioning, SMM-like "Collect the red coins to spawn a key" mechanic!

-You may have noticed one of the triggers was "On Death". This can be used to spawn stuff when enemies die.
The "on death" trigger doesn't require the enemy to be in particular layer. However, if you want to do something like "spawn the key after killing a set of Goombas", use "Layer is empty" on a layer full of Goombas instead.-Another important event function is "Layer Movement". We can use this to set up simple moving platforms.
-As an example, let's make this cloud move left and right over a gap.

-First, put the cloud in its own layer.
-Now create two events, "cloud move right" and "cloud move left".
-For "Cloud move right", check the "Autostart event" box - this will cause the event to start immediately when the game loads.
-Open "Layer movement", select the Cloud layer, and set Horizontal speed to 1 (block per second).
-Then, open "Trigger Event", select the "cloud move left" event, and set a delay of 2.0 (seconds). Thus, 2 seconds after the "cloud move right" event starts, it will trigger the "cloud move left" event.

-Similarly, configure "cloud move left" to set horizontal movement to -1 (negative values mean left), and set it to trigger "cloud move right" with a 2 second delay.
-Now when you test the level, the cloud should be moving!

-There's not much limit to the scope of Layer Movement events. For instance, you can make fairly large hazards too!

That's all the basics on how to make Layers and Events work with each other. Figuring this stuff out was when I really felt sold on this engine being a more powerful creation tool than Mario Maker. So, be creative and explore the possibilities!