If you are reading this, thanks in advance you are the people that keep the R3 community alive
Okay, here is my problem. I have made a mining system... Well, I'm trying to. I have hit a slight snag. I will show you the event first before I explain what it is meant to do.
Okay, this is what is meant to happen:
Page 1 finds out whether you have a pickaxe or not. It then finds out if this is the first time that you are using the pickaxe. If so, it assigns a random number between15 and 20; this is the pickaxe's health. If it has already been used, the number carries over from the previous time. It then also assigns a random number between 0 and 20 to the variable 'mining ore'.
Page 2 then uses the random number for 'mining ore' to decide how much ore you mine. It also generates a random number between 0 and 10 and this is the damage dealt to the pickaxe caused by the mining of the ore. This is subtracted from the pickaxe's current health, leaving variable 'pickaxe health' as the new health.
Page 3 allows for the ore to come back after a cool-down period.
My problem is when the pickaxe runs out of life. If you mine an ore, get some units of ore and then lose the pickaxe, if you go to mine another ore, it says 'you need a pickaxe...'. However, if you mine the same ore that you mined when the pickaxe broke (after the cool-down period), it allows you to do so and the pickaxe will start to have a minus health!
Can anybody help and tell me why?!
I don't think screenshots are necessary but I will supply them if needed.
Thank you to all in advance,