The title says it, i cant seem to figue out how to make my output pulse, at a diffrent rates based on user input. example: i select the number of item pulls to be 5 how do i make it pulse 5? at a rate of 0.8 sec delay between pulses? im useing butons as the user input not direct input by right clicking the computer, idk if that helps.
tekkit 3.1.2
0
How to make the output pulse
Started by Learning_inpaired, Dec 27 2012 04:29 AM
3 replies to this topic
#1
Posted 27 December 2012 - 04:29 AM
#2
Posted 27 December 2012 - 04:43 AM
print("How many pulses?") pulses = tonumber(read()) print("Length of each pulse?") length = tonumber(read()) for i = 1, pulses do rs.setOutput("back", true) sleep(length) rs.setOutput("back", false) sleep(length) end
#3
Posted 27 December 2012 - 07:18 AM
can i do the pulse at a pre-set rate like this,
pulses = tonumber(read()
length = tonumber (0.8)
pulses = tonumber(read()
length = tonumber (0.8)
#4
Posted 27 December 2012 - 07:30 AM
Yep, though you don't need the second tonumber; length = 0.8 would work just fine.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users