Making sure my player gets hit when falling on spikes

I’m new to Gdevelop and have no experience in gamemaking and I’m trying put in a “lives system” and have spikes take a life away. It takes one life away when i run into them horizontally, but when i fall on top of the spikes it doesn’t take any health away. I’m not sure how to fix this.

Hi welcome, the reason why it doesn’t take life when you’re falling is because the event is only checking if you’re on floor. Aka meaning your on something and not falling or anything else.

I would suggest copying that whole event and paste it again then instead of “ArloPlayer is on floor” replace it double click that condition, then look for “is falling” that should fix your issue and that’s it!

2 Likes

You are changing animation of spikes when player collide with them
But at the same time you are checking if player is on the floor and if animation of spikes is 0

So when player is in the air and hit spikes you change its animation
THen player hit floor while still collide with spikes
And so event to subtract life can’t kick in

You should just remove check for if player is on floor

1 Like

BTW
Better health system
Now you on top (by Player HP variable) you determine how much health player have
Instead of creating individual event for each heart (bullet in my case)

1 Like