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.
There have been 9 items by xaberranthianx (Search limited from 29-March 23)
Posted by xaberranthianx on 17 December 2012 - 02:20 PM in Ask a Pro
Posted by xaberranthianx on 17 December 2012 - 01:06 PM in Ask a Pro
Posted by xaberranthianx on 17 December 2012 - 12:51 PM in Ask a Pro
Posted by xaberranthianx on 17 December 2012 - 12:10 PM in Ask a Pro
TheOriginalBIT, on 17 December 2012 - 12:02 PM, said:
Posted by xaberranthianx on 17 December 2012 - 12:00 PM in Ask a Pro
remiX, on 17 December 2012 - 11:55 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
xaberranthianx, on 17 December 2012 - 11:41 AM, said:
Posted by xaberranthianx on 17 December 2012 - 11:41 AM in Ask a Pro
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 by xaberranthianx on 17 December 2012 - 11:25 AM in Ask a Pro
TheOriginalBIT, on 17 December 2012 - 11:04 AM, said:
Posted by xaberranthianx on 17 December 2012 - 11:23 AM in Ask a Pro
remiX, on 17 December 2012 - 11:03 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 x, y = term.getSize() done = false function boom() term.clear() term.setCursorPos(1,1) term.setCursorPos((x-16)/2, y/2-1) write("Detonation in...") for i = s, 1, -1 do term.setCursorPos((x-2)/2, y/2) term.clearLine() write(i) sleep(1) end term.clear() term.setCursorPos((x-5)/2, y/2) write("BOOM!") sleep(5) end while not done do term.clear() term.setCursorPos(1,1) print("Enter the password to start the detonation sequence: ") write(" > ") local input = read() if input == "Nuketown" then term.clear() term.setCursorPos(1,1) write("Correct. Starting detonation sequence in 2 seconds...") sleep (2) rs.setOutput ("bottom", true) rs.setOutput ("bottom", false) boom() done = true else term.clear() term.setCursorPos(1,1) write ("Incorrect") sleep (2) end end -- Clean up term.clear() term.setCursorPos(1,1)
Posted by xaberranthianx on 17 December 2012 - 10:52 AM in Ask a Pro
--[[ 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) 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) error() end end