Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
(3 edits)

If I set My HP to value $01$ =10

and set if i interact Enemy

math functions = Subtract $01$ 15 Value

and set 

if value $01$ Less then or Equal to = 0 

it must change to Game Over scene

but it's not working 

But i Subtract $01$ 10 Value 

it's work!

(I must subtract 10 only? )

(I'm sorry for my english is not good but

i hope someone understands )

You’ve got an Underflow.

10 - 15 = 250.

When a byte goes below 0 it turns into 255.

You should check that the HP is greater or equal than the damage, if it is, substract 15 from hp, else, set it to 0.