How to add "credits" (like arcade game) whenever insert coin is pressed?

Yes

Did you change how you create the widget? it should be something like this:

The irony is, now when trying to just use Event Begin Play (level BP) it does not even appear now. Can you explain this?

That’s interesting. That should definitely add the widget. Are you using “Remove All Widgets” anywhere?
image

I should not be no, I had tried it a day or so ago but to my knowledge there is none right now. I searched in all probable places and found nothing.

Why would an event tick show the widget and not event begin play?

My best guess would be that Begin Play does show the widget, but something else is causing it to get removed.

Event Tick works because even if something else causes the widget to get removed, it’s being added back the next frame.

Can you try adding a delay of like 2 seconds in-between Begin play and Create Widget?

Ok I did, and after 2 seconds, it appears.

Ok that’s great. This does confirm that it’s getting removed somewhere else.

Does it appear if you set the delay to 0 seconds? don’t remove the delay node, just set duration to 0 (this will delay it a for single frame)

Yes it did, but as soon as the title screen moved on to the attract screen widget (after 5 seconds) it disappeared.

How are you moving to the attract screen?

Just tryed again and noticed if I hit select (insert coin input) it disappeared immediately.

The widget will only get removed if you’re either using Remove from Parent or Remove All Widgets or sometimes opening another level. Are you doing any of these?

Ok its complicated lol but I will try to show you. Wish there was a way to capture full screen blueprints.



Yes, I have some remove from parents. In a MACRO. I do not know much about widgets, but seems they cannot be destroyed on command (in blueprint anyway) but rather remove from parent and eventually garbage collection will get them.

Can you move everything from Event Tick to Event Begin Play? Just add everything after you add the Coin Counter widget to Viewport

Ok all my widgets to Event Begin Play? Will try, brb.

1 Like

I noticed now (after rerouting) that whenever the “Vid1” widget begins (attract mode) OR if I press select the credits counter widget disappears.

What’s inside the graph of Vid1 and Title widgets? maybe you’re removing it there.

Title

Vide1