how to make the text life,Do not move along with the screen,What are the events that do this?
follows the image below
how to make the text life,Do not move along with the screen,What are the events that do this?
follows the image below
I’m also not getting the number of three lives inI’m also not getting the number of three lives in the Player, follow the code below
Make sure that all items you want to stay in place and not move along with the screen are on the Layer called “GUI”. In the Properties panel, you can change the layer (camada) that the object is on.
In the upper left corner, click on this icon:
In the Game Settings menu, select Global Variables:
Add a Global Variable called Vidas and in the column to the right put 3. That way, every time you start the game you’ll start with 3 lives.
good afternoon, and the next I manage to solve this problem of lives alone, but now I want to solve the player jump on the enemy and I want that when the Player collides with the enemy lose a life, only when it is colliding with the enemy loses life all the time, as it does to implement the player jump on the enemy, by enemy destroy,And as does by Player collide with the enemy and loses a life
obs:Follow the code in this text
now when you jump on the enemy’s head decrease a life and do not destroy the enemy what I do,so that when the player jumps does not take a life but kills and destroys the enemy,and only takes a life when it collides
Remove the Action that says Change the global variable Vidas: subtract 1
. If you want the enemy to disappear, you need to add a Action to Delete Enemy
.
Make another event where the Conditions are PlayerHitBox is on the ground
and PlayerHitBox is in collision with Enemy
and make the Action for that Change the global variable Vidas: subtract 1
.