Code:
on place of anomalia:
add location of event-block to {anomalias.fuego::*}
add now to {anomalias.tiempof::*}
every 1 seconds in world "world":
if size of {anomalias.fuego::*} is bigger than 0:
set {_maxf} to size of {anomalias.fuego::*}
broadcast "SIZE OF MAXF: %{_maxf}%"
set {_initf} to 1
loop {_maxf} times:
broadcast "DIFFERENCE: %{_initf}%: %difference between {anomalias.tiempof::%{_initf}%} and now%"
if difference between {anomalias.tiempof::%{_initf}%} and now is more than 10 seconds:
set {_l} to location at {anomalias.fuego::%{_initf}%}
set block at {_l} to air
delete {anomalias.fuego::%{_initf}%}
delete {anomalias.tiempof::%{_initf}%}
add 1 to {_initf}
I am trying to when I place a block, save its location in the variable {anomalias.fuego::*} and the time it was place the block in the variable {anomalias.tiempof::*}.
That works fine. (The part of the code that says on place of anomalia)
Then I want every X seconds, check that time variable, and if find that the time is greater than X seconds, delete the block, and also delete the block of those two variables (time and location). It works with the first block I place, if I put more ... delete the first, but not the second (or third, fourth, etc...)