Started by
RedWirePlatinum
on
Topic category: User side tutorials
A while ago, I made a post asking if you could include a wait time in the "repeat [number] times" block.. well, it turns out you *CAN* do a wait time for this... and the solution was actually quite simple. I kinda feel dumb for not thinking of this before.
Make sure you have the iterator variable outside of the "wait [number] ticks" code block because obviously, local variables do not work in it. Also, make the iterator addition block the last thing that happens in a repeat block, so the first iteration happens instantly.
For example, this is for my /cmdrepeat command, so currently typing "/cmdrepeat 30 summon sheep" would summon 30 sheep within 1.5 seconds.
If you're going to do a loop within a loop (for example: for each entity AND repeat [number] times), reset the iterator to 0 before doing the "repeat [number] times" thing like so:
^ This just makes it so all entities get affected at once instead of one entity at a time
Unfortunately I have no idea how to break the loop with a wait time AAAAAAGH
Okay nevermind, actually DO make the iterator addition block the first thing the happens, apparently waiting 0 ticks then doing something simply doesn't do it.. oops
Thanks so much for making this!