#loop every 5 seconds
1 messages · Page 1 of 1 (latest)
loop {machine::*}:
set {_name} to inventory name of loop-value
set {_block} to loop-value
if {_name} is "&6&lOutput":
if facing of loop-value = east:
set {_output} to block 1 east of loop-value
if {_name} is "&6&lOutput":
if {_output}'s inventory has stone:
if {_block}'s inventory has enough space for 1 stone:
broadcast "its doing it"
remove 1 stone from {_output}'s inventory
add 1 stone to {_block}'s inventory
stop```
If I'm understanding correctly, you want all machines::* to run this code at once
You could just set up a function
im sorry but i dont understand functions could you tell me how not like all of it but simple example
function Machine(i: inventory):
#code
every 5 seconds:
loop:
Machine(loop-value)
im not sure if "inventory" is a correct data type
ok i try later and see thank you
it didn't work is there a way to make it without a functions?
not that I know of