Hello, I want to implement a hunger system to my game.
The point is that every certain step the main character displays an icon that says he is hungry. I have managed to make the system, every so often the character deploys the icon and his life begins to fall. and heal with some food.
What I want to do is that instead of "time" be "steps" since having that parallel event in "wait 999" like 7 times all the time makes the game a little slow.
The question is: how can I calculate the number of steps? can I take it in some variable? I want something like every x steps that make him hungry.
The point is that every certain step the main character displays an icon that says he is hungry. I have managed to make the system, every so often the character deploys the icon and his life begins to fall. and heal with some food.
What I want to do is that instead of "time" be "steps" since having that parallel event in "wait 999" like 7 times all the time makes the game a little slow.
The question is: how can I calculate the number of steps? can I take it in some variable? I want something like every x steps that make him hungry.