Advertisement
RTS_Dmitriy

Lift activator

Feb 10th, 2024 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | Gaming | 0 0
  1. MY_FLOOR = 1
  2. SECRET = 'first'
  3.  
  4. rednet.open('back')
  5.  
  6. print('Waiting for activation...')
  7.  
  8. while true do
  9.     id, floor = rednet.receive(SECRET)
  10.     print('Got this floor: ', floor)
  11.     if floor == MY_FLOOR then
  12.         print('Activating teleporter to floor', MY_FLOOR)
  13.         rs.setOutput('front', true)
  14.         sleep(1)
  15.         rs.setOutput('front', false)
  16.     end
  17. end
Tags: RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement