UPBGE Show text and disappear after collission

I’m new with using UPBGE and staterd with a tutorial ( Space Invaders) https://www.youtube.com/watch?v=XryDhoTQTDI&t=334s&ab_channel=AlastairLow The game is working after following the steps in the tut.

I want to add some text in de game, directly after the ‘enemy’ is hit, like: “+1” and dissapear after the next shot or time (=0,5 second).

can you help me how to do this !!


Hello there! One way to add text (or anything) for a small amount of time is to use an empty to add text for a certain amount of time.
Create your text, and then move it into a separate layer (using “m” and selecting the desired layer to move it to) Then create an empty. Add an “edit object” actuator to the empty; the text as the object to add, and then adjust the time to the desired length of time that you want the text to be shown (I think 50 or 60 should do)
capture of blender
Place the empty in from of the camera, and parent it to the camera (if the camera moves) using ctrl “p”. (You can also put the empty in a separate scene that has a 2d camera, and then display that scene using the “scene.add overlay scene” actuator) Whichever way you would like to do it should work just fine.
Then just add whatever sensor you want to display the text. If the sensor is on another object, then you can select the other object, shift select the empty, and connect the object’s sensor to the empty’s edit object actuator (via an “and” controller).
I hope this helps, and if you run into any problems or have any questions, please ask them!