#timer and become another block (like water to ice) script
1 messages · Page 1 of 1 (latest)
import { system } from "@minecraft/server";
system.runTimeout(() => {
// What will happen then
}, 100); // Time using ticks (20 ticks = 1 second)
No errors in [code](#1193804182264746156 message)
Thanks @brave zinc
And also how I detect it the custom block touches another custom block with timer
I mean, when water touches ice and it slowly becomes ice too
You can get the PlayerPlaceBlock event and set a timer if the block is touching the block you want to detect
And when the timer is done, check again if it is still touching that block
You can use system.run() and add method to detect the block and add timer after that change the block
timer and become another block (like water to ice) script
Tell me which one of your ideas is the best for my addon?
i think it will get laggy if hundred timeouts execute
what
its just how how many ticks it is, not how many times its going to execute
will it execute only 1 time? or he wants it to execute everytime smth happens?
ik
i thought he wants to put that in a event
...no, its just delaying it
okay buddy.
you dont need to screenshot anything.
instead typing it again i can send screenshot
you dont need to type it again either
Timeout executes only once
If you put it in a event like afterEvent.playerPlaceBlock after placing a block this timeout will execute
I was talking about a event not one time script
Just need to check if its the correct block before setting the timer
yeah but it can run multiple times
I can test it out, I can simply make a script that after 5 minutes it deletes that block that I placed (fe. wool) I can place stacks and see if it lags