it just goes: how fast am I moving compared to how fast I was moving 0.5 seconds ago… much slower? pop
reader = peripheral.find("ship_reader")
sleep(1)
while true do
ovx,ovy,ovz = reader.getVelocity()
sleep(0.5)
ox,oy,oz = reader.getVelocity()
if math.abs(math.floor((ovz-oz)*100)/100) > 0.5 or vz == 0 then
redstone.setOutput("bottom", true)
sleep(3)
redstone.setOutput("bottom", false)
end
print(math.floor((ovz-oz)*100)/100)
end```
Well I started programming in python a long time ago and it’s really similar
10 replies not shown · View on Discord