Game Win/Lose screen does not show

I have a game in development called ‘Adventures of PixelBoi’ so midway in the development I noticed that the game win or lose screen both don’t show. I set the logic like this:

If Player collisions with enemy or lava set boolean variable ‘Dead’ to true and show game lose screen

If Player collisions with key set boolean variable ‘Win Stats’ to true and show game win screen

I’ve checked capitalization and done different methods to fix it but it doesn’t seem to work. Something just makes the screens not show up. Any help is appreciated.
(I made the full screen because new users are only allowed for 1 image)

Is that GameLose/Win screen a layer

I don’t know much about variables but I think object variables gets deleted with their objects…I am not sure btw…

It is in the UI layer, its not a layer

It used to work fine?

That’s right.
The Dead condition is not true, because the variable is previously deleted with the object.
Use a screen variable or delete the player after showing the loose screen.

I don’t understand what you mean by the screen variable. I tried another way which is making a new object and adding a variable to it. So when the player collides with enemy/lava the new object turns its variable to true and making the lose screen visible, it doesn’t work either. I tried deleting player after showing lose screen but it doesn’t work too.

In addition to object variables, there are also scene and global variables. Check examples, tutorials, wiki or the “Variables” category.
Move your Show Object action up to find out if the show or the variables are the problem.

1 Like