I want to make a pop up notiffication containing text and information inside it about lore stuff.
An I example I want to show is vampire survivors when you reach max exp the game pauses and you get a pop up menu and everything is paused until you pick an upgrade.
here’s another example this one is much closer to the end result I want
I want it to appear whenever the player interacts with certain objects.
You can do it in a few different ways, but one I’ve used is having the pop items on a different layer. Hide it till you want the player to see it.
That could work but what I don’t know right now is making it go away, because I want it to go away once the mouse has clicked on a confirmation button because I’ll have the player interact with multiple objects that will give a popup notification with different texts on them, I was thinking of just an image that would pop up but then how would I attach a button to it or could I do it, I was thinking of creating a point on the object and attaching the button from there but that seems I guess I would say unconventional since I would have to centralize the button to the image myself
There are so many different ways of doing things.
You can add all of the objects including buttons to another layer and then hide/show it. Just make sure any click event includes a condition to check if the layer is visible since hidden objects can be clicked.
You could add the objects then delete them when done. Either seperatly or put the objects in an external layout, add the layout and then delete the objects afterwards.
I think I can picture it out a little, but can you provide me a screenshot of what would it look like so I can get a basis and an example for it? I would really appreciate it.
I’m not at my PC. You can search for pause menu. This seems like a good. Tutorial.
Ok I will try it with the layers but one thing I don’t understand is how do I position in to wherever I want based on the camera, currently my camera will follow my player but I want the button to be positioned somewhere low.
This is what my camera sees and the red circle is where I want the button to be.
Bumping this thread
I got the dialogue working but now I only need the trigger.
Well I actually know how to trigger but I don’t know how to tell the game how
What I want to do is when the player is colliding with an object the player will press E then the popup appears but I do not know how to only enable a key press when the player collides with an object.
The first is not necessary to press the E key during a collision. You can do it if the player gets close, then he sees a hint that he needs to press E. The second is immediately as the distance to the object is less than 20 px, then show a layer with dialogue or make an event simulate a key press