Want help for coding


#1

hello, I was building my first game with Gdevelop using templates provided with it I added score and level in it which works fine however when I add lives it counts properly and do the minuses however I don’t want to minus a life when a player is falling onto to the enemy or when the enemy has died I just want to do minus a life when the player actually touches the enemy without killing it how do I do it please tell me and really I love Gdevelop for its simplicity.


#2

Hi,
There are at least two ways to approach your problem.

You can add conditions for the minus life action, one to check if the player is not falling when colliding with the enemy, and another one to check if the enemy is not dead (checked with object variable or animation).

or

You can add conditions to check those too (using object variables, for instance).

PS: next time, try to find a more meaningful title :slight_smile: