I checked, and I already had that line up above the function. I'm not sure what I am missing. If you don't mind, let me show you what I've got so far.
This is the code I have in the global script.
This is the code I have for a first-aid kit to recover health (with a sound playing when that happens).
...and here is an example of Ron taking damage from the first example I could find from my game (with the first code listed above shown at the top of the room script).
The animation pretty much shows Ron catching on fire from the stove once his HP has reached zero, or at least, that's how I'd like it to work. The same problem seems to be here: I touch the stove and lose 15 HP. Using the first aid kit (recovering 20 HP, but really only going to 30 HP, the maximum) I touch the stove again and Ron loses all of his health instead of another 15 HP. What am I missing?
This is the code I have in the global script.
This is the code I have for a first-aid kit to recover health (with a sound playing when that happens).
...and here is an example of Ron taking damage from the first example I could find from my game (with the first code listed above shown at the top of the room script).
The animation pretty much shows Ron catching on fire from the stove once his HP has reached zero, or at least, that's how I'd like it to work. The same problem seems to be here: I touch the stove and lose 15 HP. Using the first aid kit (recovering 20 HP, but really only going to 30 HP, the maximum) I touch the stove again and Ron loses all of his health instead of another 15 HP. What am I missing?