Posted 03 February 2018 - 09:40 AM
Hello there!
I'm trying to make a program which prints: "Train is here" when the cart activates the Detector Rail. I managed to make it do that, but the message stays onscreen even when the cart is gone, and i don't know how to make it disappear and reappear when the cart is back.
This is my code:
while true do
os.pullEvent('redstone')
if redstone.getInput('back') ==true then
print('Train!')
end
end
I'm trying to make a program which prints: "Train is here" when the cart activates the Detector Rail. I managed to make it do that, but the message stays onscreen even when the cart is gone, and i don't know how to make it disappear and reappear when the cart is back.
This is my code:
while true do
os.pullEvent('redstone')
if redstone.getInput('back') ==true then
print('Train!')
end
end