Started by
8BitBunnie
on
Topic category: Help with MCreator software
Hey there! you're probably one of the many people who need a wait function in Mcreator, and have looked almost everywhere for one. well there is one! it's just under the "Flow control" Tab when you're making a procedure. if you scroll all the way to the bottom, you'll see a "Wait 20 ticks then on server-side do" block! you can change the amount of ticks to anything and it'll work!
For anyone who sees this 20 ticks = 1 second!
But for me if i do use it absolutely nothing happens when i use it in like
When block is broken by player do:
Wait 1200 ticks on server side
Place (Block) on X Y Z
and when i test it nothing happens
For me it works, but not with local variables, at least to my knowledge. Can someone give a solution/alternative? (for context im trying to set the players hp to a local variable's value)
I personally don't use local variables, (although I'm sure they can be useful in certain situations) and although I may be biased, I'd recommend just using a global variable instead
Global variables break it.
does this work for single player with the on player tick update trigger?
Technically yes, but it won't do what you want it to. Anything in the wait block will still run 20 times per second (on player tick update) but its start will be delayed by the time in the wait block. I would recommend looking up a variable counter, an nbt counter, or a potion timer instead.
this is what i wanted