TheOriginalBIT, on 17 December 2012 - 01:13 PM, said:
Fair enough Whatever it is, I hope to see it available someday! Good luck, and may the coding force be with you.
Posted 17 December 2012 - 02:29 PM
TheOriginalBIT, on 17 December 2012 - 02:09 PM, said:
Dlcruz129, on 17 December 2012 - 02:04 PM, said:
TheOriginalBIT, on 17 December 2012 - 11:47 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
remiX, on 17 December 2012 - 11:30 AM, said:
--[[ MAKE A DETONATE SEQUENCE THAT ACTIVATES THE NUKE AND STARTS A COUNTDOWN FROM 20 TO 0, THEN RESETS. ]] s = 20 -- Variable for later in the countdown section while true do term.clear() term.setCursorPos(1,1) write ("Enter the password to start the detonation sequence: ") local input = read() if input == "Nuketown" then term.clear() term.setCursorPos(1,1) write ("Correct. Starting detonation sequence.") sleep (2) rs.setOutput ("bottom", true) sleep (1) rs.setOutput ("bottom", false) break -- stop the loop else term.clear() term.setCursorPos(1,1) write ("Incorrect") sleep (2) end end -- This is where it loops back to the first "while true do" function. So after correctly inputting the password and everything activating, it goes back through the loop. while true do -- I want it to start here when the previous "end" is done, instead of loop back to the first "while true do" function term.clear() term.setCursorPos(1,1) write ("Detonation in: "..s) s = s-1 if s == 0 then term.clear() term.setCursorPos(1,1) break -- stop the loop end sleep(1) -- To make it wait 1 second end
Posted 17 December 2012 - 02:34 PM
xaberranthianx, on 17 December 2012 - 02:20 PM, said:
Dlcruz129, on 17 December 2012 - 02:29 PM, said:
TheOriginalBIT, on 17 December 2012 - 02:09 PM, said:
Dlcruz129, on 17 December 2012 - 02:04 PM, said:
TheOriginalBIT, on 17 December 2012 - 11:47 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
remiX, on 17 December 2012 - 11:30 AM, said:
--[[ MAKE A DETONATE SEQUENCE THAT ACTIVATES THE NUKE AND STARTS A COUNTDOWN FROM 20 TO 0, THEN RESETS. ]] s = 20 -- Variable for later in the countdown section while true do term.clear() term.setCursorPos(1,1) write ("Enter the password to start the detonation sequence: ") local input = read() if input == "Nuketown" then term.clear() term.setCursorPos(1,1) write ("Correct. Starting detonation sequence.") sleep (2) rs.setOutput ("bottom", true) sleep (1) rs.setOutput ("bottom", false) break -- stop the loop else term.clear() term.setCursorPos(1,1) write ("Incorrect") sleep (2) end end -- This is where it loops back to the first "while true do" function. So after correctly inputting the password and everything activating, it goes back through the loop. while true do -- I want it to start here when the previous "end" is done, instead of loop back to the first "while true do" function term.clear() term.setCursorPos(1,1) write ("Detonation in: "..s) s = s-1 if s == 0 then term.clear() term.setCursorPos(1,1) break -- stop the loop end sleep(1) -- To make it wait 1 second end
0 members, 1 guests, 0 anonymous users