[Solved] Problem with Hide/Show Objects

Hey Guys!

In my little Platformer Game the layer has to jump upon a rolling barrel to find his Bagpipe Chanter.

At the beginning of the scene the Bagpipe is hidden (Action: “Hide Bagpipe”). When the Player jumps upon the barrel, it explodes and when the animation is finished, I set the actions “delete barrel” and “show bagpipe” (it doesn’t matter at what position the Player destroys the Barrel, the Chanter always appears on the same position). That works absolutely fine.

But when the object is hidden I can still collect it so I made the following event to check the visibility in case of a collision btw Player/Bagpipe:

Problem is now: When the Player jumps upon the barrel but is NOT in collision with the Bagpipe, the Bagpipe still gets deleted (after you saw it for around 0,2 sec).

I couldn’t find another condition or action which could help me, maybe someone has an idea?


Maybe putting both conditions in the same event. I could say the logic looks good and it should work as intended. Not sure if there are more events below, yet you could give it a try to put them together.

Try looking at the collision mask of the Bagpipe and Player and see if something’s wrong with that.

Good idea! I tried it put nothing changed.

@Muzan I looked it up and even put the Bagpipe on another position so that there is a lot of space between them but it doesn’t change anything…

Can you confirm it gets deleted, and not hidden again?

You were right, it got hidden again.

But I solved it now:

I had 2 times the condition “At the beginning of the scene” (as first event and some events later again) - I deleted the second one and put every “Hide” Action into the first event. Now it works.

I am not able to explain this bug but still thank you all again for your help!