I have a student who’s sprite loses all their lives when it contact lava, instead of just 1 life. When I swap out the sprite for a smaller one, it doesn’t have the same issue. I’m pretty sure it’s got to do with the size of this sprite, but I can’t figure out how to get the sprite to respawn and only lose 1 life.
Never mind, I found it (maybe). The player is actually never given any lives, so its basically only declared that they should when they lose one. At the beginning of the program, add
Set life to (3)
(3 is the number of lives)
You can make it so that when the player touches the lava, they instantly get teleported to the respawn location. Then, the code only takes away one live.
You could also make a variable, “In lava”. When the player is in the lava, then “In lava” is set to true or 1. The player only gets dealt damage if “In lava” is false or 0.