Hi game makers,
The player will be able to chop trees in my game. The idea is that the player will get 3 wood from each tree a day, if the party got an axe.
I got the time system working - I'm using Moghunter's. The only thing I got trouble with is to make it so the player only can get 3 wood. So, when they got 3 wood from the tree, then nothing else happens.
My mind is blank, so I hope anyone could help me out?
I don't have issue with his plugin. It's the chopping trees I got issue with. I want the player to only chop 3 wood on one tree. The player can chop a tree once a day, I got the time system working though, it's just the chopping trees I need to work.
Thanks though.
$gameSystem.day() === 1
To 31
To set the date to receive the wood
I think you're misunderstanding my post. I'm sorry if I haven't been clear enough.
The only thing I need help with is to make sure that the player can only chop 3 wood per tree. I don't know how to check when the player got the 3 wood from the tree and then make the tree stop giving more wood.
I don't have issues with the time system. I only mentioned it just in case if anyone was wondering.
I think you may be able to make use of self-variables, which requires a plugin.
Every time the player chops wood, increment the variable of a tree by 1.
Also, have a global variable somewhere, not sure if your plugin gives you the absolute number of days that have passed. So, if a tree's variable is less than the number of days times 3, allow chopping, if it is greater or equal to the number of days times 3, then disallow chopping.
The problem with this is that if they didn't chop the tree every day, they'd be able to catch up on the lost wood. So, you can also check for if the tree's variable is less than the number of days times 3 subtract 3, and if so, then you set the tree's variable to the number of days times 3 subtract 3.
E.g. It is Day 3. The tree's variable is at 0, because the player has never chopped it. So, your conditional branch will set the tree's variable to (3*3)-3 = 6. The player chops once, variable is now 7, chops again, now it is 8, chops again, now it is 9. Tries to chop again, but the tree's variable is not less than the number of days times 3, which is (3*3) = 9. But, on the next day, Day 4, the number will be 3*4 = 12, and that tree can then be chopped three more times.