Item Limit

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

RAT3440

Member
Oct 18, 2024
2
0
1
So I made a skript that spawns items at a specific place but it adds up too much. I can't figure out how to add a limiter to the skript. I need it to start generating again after it has been collected.
This is some of my code:


every 10 ticks:
if {summon} is "enabled":
drop {boost::gen} of sand at location(27.5, -57, 2.5, world "testworld") without velocity
drop {boost::gen} of stone at location(17.5, -55, -32.5, world "testworld") without velocity
drop {boost::gen} of iron ingots at location(-37.5, -47, -20.5, world "testworld") without velocity

(this is for 3 dif gens)

Any help would be great
 
So I made a skript that spawns items at a specific place but it adds up too much. I can't figure out how to add a limiter to the skript. I need it to start generating again after it has been collected.
This is some of my code:


every 10 ticks:
if {summon} is "enabled":
drop {boost::gen} of sand at location(27.5, -57, 2.5, world "testworld") without velocity
drop {boost::gen} of stone at location(17.5, -55, -32.5, world "testworld") without velocity
drop {boost::gen} of iron ingots at location(-37.5, -47, -20.5, world "testworld") without velocity

(this is for 3 dif gens)

Any help would be great
Simply add 1 to a variable and on pick up, if the event item is a gen item, it removes one from that variable. Then you can check, every 10 ticks if each variable is a certain number and if it isn't that number (Ie: 10 max items). Then it'll drop then item.
 
Simply add 1 to a variable and on pick up, if the event item is a gen item, it removes one from that variable. Then you can check, every 10 ticks if each variable is a certain number and if it isn't that number (Ie: 10 max items). Then it'll drop then item.
I have already tried something like that but ran into the issue of dropping manually and picking it up causes the limit to go crazy. Is there any work around for that?