Both of you have incredible ideas tbh. Brian’s idea of throwing a boot into the mix because you’re not a good fisher is one fun way to bug my players (and a good way to get a good laugh, xD), but it also shows evolution… I like it tbh, but I like the idea of getting more logs better on the long run. Why? Because it means I can make the progress slightly slower, so you guys are on, quite literally, a 50-50 split. For trees, we can also drop random leaves through the drop library for instance, or just throw out random stuff…
Anyway, this function goes into ‘ResourceGatherer’ and is called for a variable known as ‘AmountToGive()’, right? Here’s what I tried doing, but it gives out a ton of logs at the start, and then gives you one log per coroutine… (Did I do something wrong in the code?):
In ‘ResourceGatherer.Gather()’, I implemented this to use that function:
// Some code here...
int amountToGive = DetermineAmountToGive(playerSkillLevel, target.GetMinSkillRequired(), target.GetMaxSkillRequired(), target.GetQuantityLeft());
// if (UnityEngine.Random.value <= playerDropChance) {
playerInventory.AddToFirstEmptySlot(target.ResourceToAccumulate(), amountToGive);
target.quantityLeft -= amountToGive;
AccumulateXP();
// }
// Some other code here...
So the way it works is as follows (I don’t know how you analyze this stuff in your head, but good job btw):
- If you’re level 1, you get 3 logs on the first shot, and then 1 log each until the tree dies…
- If you’re a higher level, you get a max of 5 per shot, and then 1 log each until the tree dies…
etc etc
So in a nutshell, you get ‘x’ number of logs at the start, and then 1 log until the end… I was hoping for chances of multiple logs per hit (so you get ‘x’ logs per hit, and keep the limit under the number of resources my tree has left before it dies, and increase the limit of that number based on the level of the player… I think we did this in your current ‘DetermineAmountToGive()’ function), but it’s all good for now… (even if this fails, my system is more than enough to keep me happy for now xD, thanks to you and Brian)
I’ll go buy animations for now and try implement them into my game