One of the basic mechanics in my episode is to have the player collect 5 star coins in a level in order to get the star to appear in a certain spot. In my current level, I've been testing it to make sure that collecting all 5 star coins is possible & that the star appears like it's supposed to, but it's not. Event wise, this is pretty simple. I have all 5 star coins on a 'Star Coins' layer, with each one set with it's Star Coin ID & the option that when all objects on that layer are gone, the 'Star' layer would show. The event itself is also pretty basic. Collecting all 5 Star Coins should trigger the event, which in turn should show the star layer, but it won't.
When I used cheat codes to make the test playing easier (the level is HARD), I noticed that the star did appear, but when I wasn't using cheat codes & collected all 5 star coins (which required many tries), the star wasn't there. The reason I used the cheat codes was to confirm a suspicion I had about whether Star Coins are still considered to be collected after restarting at a checkpoint, in which case, any star coins collected before reaching a checkpoint are saved, but ones you collect afterward before you die are not. But when I collected the 5th & final one, it made a notification sound that normally happens when you collect all the star coins from a level.
So is this some sort of bug or something? How can I fix this issue?