Hello to all.
I’m trying to make a battle system.
Your enemies will hit you, and your health will decrease in random.
So I’m using *rand command.
Ex: *rand health 70 100
Code works fine. But there is a problem.
Imagine that you are in the beginning of a battle.
Your health is 100.
The enemy hits you, and your health decreases between 70 and 100.
Lets say “80 Health” lost.
When my health drops to 80, I take a look at the stats screen and see that my health is now 80.
When I say “NEXT” to see the actual battling scene, and then press Stats button again, my health decreases between 70 100 again.
Now, my health is 74 and I chose nothing.
“NOTE: My health is not going under 70”
If I repeat this page switching thing, my health decreases to 88, 91, 72, all random numbers between 70 and 100.
And all I do is just switching the screens.
I think, everytime I open the scene, *rand command starts function again.
How can I solve this?
I want to decrease the health just once.