- 68
- Posts
- 6
- Years
- Seen Aug 25, 2023
Hi!
Well, I was trying to implement some sort of materials gathering and item crafting for my game and I wanted, for example: when you break a rock you can get some ores, stones and that. But i wanted it to be random and no lineal, an example for the example xd: You break one rock and you get 2 Copper ores, 1 Iron Ore, 1 Silver ore. You break another rock and you get 1 Copper, 3 iron, 1 silver, you break another and you get 2 copper, 1 iron and 2 silver... And so on.
Firstly i started with conditional branch and they worked pretty well, but that way was son long, hard, awful and annoying that i gave up... Then i was searching in google and I found this: https://www.pokecommunity.com/threads/415258
That post is pretty close for what i want but, it always gives just one item and for a quantity of one, i mean: If i break a rock i get 1 copper or 1 silver, or 1 iron, but never 2 copper, or 3 copper. So, i was wondering if is possible to make something like what was made in that post, but making it gives a random quantity of a random pool of items.
Thanks!
Well, I was trying to implement some sort of materials gathering and item crafting for my game and I wanted, for example: when you break a rock you can get some ores, stones and that. But i wanted it to be random and no lineal, an example for the example xd: You break one rock and you get 2 Copper ores, 1 Iron Ore, 1 Silver ore. You break another rock and you get 1 Copper, 3 iron, 1 silver, you break another and you get 2 copper, 1 iron and 2 silver... And so on.
Firstly i started with conditional branch and they worked pretty well, but that way was son long, hard, awful and annoying that i gave up... Then i was searching in google and I found this: https://www.pokecommunity.com/threads/415258
That post is pretty close for what i want but, it always gives just one item and for a quantity of one, i mean: If i break a rock i get 1 copper or 1 silver, or 1 iron, but never 2 copper, or 3 copper. So, i was wondering if is possible to make something like what was made in that post, but making it gives a random quantity of a random pool of items.
Thanks!