How to make a player invincible?


First Step


Second Step

Decide what will trigger the behavior. This could be an action like a collision, an interaction, or the game starting. Select a “Trigger” box and drag it into the editor.


Third Step

Navigate to the “Game Actions” section, and select the ‘Set Maximum Lives’ and ‘Set Lives’ blocks. For example, you might set ‘Set Maximum Lives’ to 9999 and ‘Set Lives’ also to 9999. In that way, your player will have several lives in the game. The same can be done with Health in case you don’t want your player to get killed, simply use the blocks ‘Set Maximum Health’ and ‘Set Health’ instead.


Fourth Step

Exit the Behavior Editor, playtest and ensure it works as expected!