Generator help with spawning

So I want a generator to just generate resources for my space themed bedwars game (please do not lose motivation, note to future self) and I just want it so a generator, if you step in it, it gives you resources.

I can make the upgrading part so don’t worry (most likely I can remix it, but add a part so I can turn it off and switch it for a new algorithm) but I want it to be able to pile up, so if you haven’t been at your generator for a solid minute it will give you like 60 resources instead of 1, and then keep going at one resource a second (or upgrade be able to upgrade it to half a second)

TL:DR Generator that makes resources that can stack resources that haven’t been collected in a while that can be upgraded

3 Likes

I think this could work I haven’t tested it. You could have a property for each resource and have a counter update for each one. Have a repeater that starts on game start (using a lifecycle) that runs every second and ends when it receives on channel (don’t put anything in the channel box so the repeater runs forever). Wire the repeater to a trigger that adds a random resource to one of the properties (if you don’t know how to do it I think there are a few guides). Then have a zone in the area that you want the player to collect resources. Have a different repeater (that runs at the same intervals that the other repeater does) start when the player enters the zone and end when the player leaves. Have an item granter for each resource and wire the new repeater to each one (MAKE SURE TO GRANT CUSTOM AMOUNT). Make a block in each item granter that grants whatever that property of the corresponding properties value.

Let me know if this worked if not I could try to test it out to solve the problem and hope you understand my unformatted instructions.

1 Like

Well it looks like it’s my old friend.
I don’t know if you’ve seen this guide (think it’s the right one), but you should just follow that guide, and if you want it only to be when they’re in the generator, you can use a zone.

Hope this helps!

2 Likes

Ok I will check it out tomorrow morning :+1:

Zone(when left) → Trigger(Block code: +1 every second to property “Pile-up”)
Zone(when returned) → Item Granter(fetch property “Pile-up” and drop resources “Pile-up” times).
Then the item granter will reset “Pile-up” to 1(changes based on upgrade) and it will be in a loop(with a trigger or something else) so that it can repetitively grant resources “Pile-up” times every second(changes based on upgrade).

1 Like

Alright, thank you so much! This should work!

And also for Here to help, (Bird), one part of the guide doesn’t have an image working that is necessary for the instructions like for the block code, but thank you for the effort as it has help got me back into the flow of building, lol. I’ll maybe ask more help later, so see you around, friend.

3 Likes

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.