I am unable to find out how to solve this, I would appreciate if you can help me.
I want to calculate the distance between two points and divide it by 3.5, I do this with:
Then I want to do the following, you have to wait X amount of seconds, this "X" is the resultant number of the operation that calculates the distance between the two points.
For example, if the distance between the two points is 5000 blocks, you would have to wait 5000/3 = 1666 seconds for the script to continue.
The part of code that I have made and does not work is this:
This part of the code does not seem to work (gives error):
How can I do this?
Thanks in advance
I want to calculate the distance between two points and divide it by 3.5, I do this with:
code_language.skript:
set {palomas.distancia.%player%} to a rounded distance between the player and {palomas.destinos::%{_destino}%} / 3.5
Then I want to do the following, you have to wait X amount of seconds, this "X" is the resultant number of the operation that calculates the distance between the two points.
For example, if the distance between the two points is 5000 blocks, you would have to wait 5000/3 = 1666 seconds for the script to continue.
The part of code that I have made and does not work is this:
code_language.skript:
set {palomas.distancia.%player%} to a rounded distance between the player and {palomas.destinos::%{_destino}%} / 3.5
set {_distancia} to {palomas.distancia.%player%} parsed as number
set {palomas.tiempo.%player%} to now
wait %{_distancia}% seconds
if difference between {palomas.tiempo.%player%} and now is greater than {palomas.distancia.%player%} seconds:
add {_mensaje} to {palomas.buzon.%{_destino}%::*}
stop
This part of the code does not seem to work (gives error):
code_language.skript:
wait %{_distancia}% seconds
if difference between now and {palomas.tiempo.%player%} is greater than %{_distancia}% seconds:
How can I do this?
Thanks in advance