> % is a symbol of modulo (reminder after division) e.g. 10%3 gives 1.
> If you want to check if player's health is more than 50% you should compare this: player.health/player.maxHealth>=0.5
i want to check it in % because i might have the player max health be upgradable so 100% health could go from 100 to 150 +, etc...
Use a global variabe for Max Health and one for Set Health that way you can change it as the game progresses.
On Player Collision with Enemy: Subtract 10 from MaxHealth
On MaxHealth < SetHealth/2: Change HealthBar Sprite
That way you can change SetHealth later in the game to a higher number and the event adjusts. When you change SetHealth make sure you also set MaxHealth to that same number to start.