Just sent you a few coffee's thank you for all your help.
I think I'm following you a little bit.
In this part of the game there are four foods (Cheese, Cookie, Sushi,Roll). I can make them one item with four animation frames and call that food. If you suggest that. But then I run into the issue of when the 'food' collides with the mouth resetting it it and having four different animation frames moving back to the original point they were dragged from.
I have an invisible sprite called 'mouth' when the 'food' sprite collides then add 4 (full health) to the health variable called "hungryscore".
Then set the health bar sprite to full animation frame 4.
And make the character hungry animation invisible and turn back on the character neutral animation.
I have a system every 1 second subtract 1 from the "hungryscore"
When hungryscore is <=0
Set the health bar sprite to empty animation frame 0.
Turn off the character neutral animation
Turn on the character hungry animation.
I hope I'm explaining it clearly apologies if I'm not.
Here's a video demonstrating how it works now.
youtu.be/KNX3YaQw28o
I'd love to simplify the code I'm trying to get my skill level and understanding up to the task.
Here is a link to the file:
drive.google.com/file/d/1txTu26urW49n5ldZIVjTErcfy7xy9WL8/view