this is my first ever post! i just need a program/help on a program that would allow me to send 5 redstone signal in a certain time in minecraft.
it would be helpful if you guys post a program that did this :D/>.
rs.setOutput("right", true) --Sets Output On The Right Side to True
term.write("Which Side?: ") --Prints "Which Side?: " While Allowing You To Type On the Same Line
side = read()
tostring(side) Dont Think This Is Needed
term.write("On Or Off?: ")
on = read()
tostring(on) --Again, Dont Think This Is Needed, But Ive Drawn Errors Before By Not Using It
if on == "on" or on == "On" then --This Says That If The Users Types In "on" OR "On" Then Do The Following
on = true --Sets On To True
elseif on == "off" or "Off" --Same Thing As The Above Code "If on == on" Code, Only This Time Uses Off
on == false --Sets On To False
else
print("I Don't Understand")
shell.run(program) --This Will Run Your Program Again (Program Here Meaning Whatever You Typed In To Edit This Program(I.E.: edit startup))
end
rs.setOutput(side, on) --Runs Program
I'm sorry for the huge offtopic, but it's something I have been wondering for a little while…
Why do some people start every single word with a capital letter? Are there some languages in which you're supposed to do that? Or am I missing something super obvious here?
I'm sorry for the huge offtopic, but it's something I have been wondering for a little while…
Why do some people start every single word with a capital letter? Are there some languages in which you're supposed to do that? Or am I missing something super obvious here?
They speak a language where they capitalize differently, not starting every word with a capital, but they don't grasp the correct capitalization for English and capitalize everything. Just in case someone wants to learn, captialization rules.
I need a program that makes the computer automatic sends 5 pulses (on a sertian time of day 2 times) of redstone signal to pistons to open up/ close a gate
I Fully Grasp The English Language, Its My First Language And I Speak It Fluently (Lol). I Just Capitalize Out Of Habit Because I Did When I Was Younger Haha
I need a program that makes the computer automatic sends 5 pulses (on a sertian time of day 2 times) of redstone signal to pistons to open up/ close a gate
Which Directions? I Can Whip Up A Code If You Need, Otherwise Check Out This Redstone API Wiki Page
I need a program that makes the computer automatic sends 5 pulses (on a sertian time of day 2 times) of redstone signal to pistons to open up/ close a gate
Which Directions? I Can Whip Up A Code If You Need, Otherwise Check Out This Redstone API Wiki Page
yes please, i need to send he signals left and right at the same time for 5 times at morning and at dusk send 5 redstone signals behind in minecraft with a delay per signal and have a delay of 4 seconds per signal. btw i want this run automatically and daily (srry about this complex request im use to a different coding program and i have exams coming up)
function pulse()
for i = 1, 5 do
rs.setOutput("right", true)
rs.setOutput("left", true)
sleep(4)
rs.setOutput("right", false)
rs.setOutput("left", false)
sleep(4)
end
end
local alarm = os.setAlarm(0)
local alarm2 = os.setAlarm(12500)
while true do
local evt, arg = os.pullEvent("alarm")
if arg == alarm or arg == alarm2 then
pulse()
end
end
\I need a program that makes the computer automatic sends 5 pulses (on a sertian time of day 2 times) of redstone signal to pistons to open up/ close a gate
Which Directions? I Can Whip Up A Code If You Need, Otherwise Check Out This Redstone API Wiki Page
yes please, i need to send he signals left and right at the same time for 5 times at morning and at dusk send 5 redstone signals behind in minecraft with a delay per signal and have a delay of 4 seconds per signal. btw i want this run automatically and daily (srry about this complex request im use to a different coding program and i have exams coming up)
No Problem At All : D Besides, Not That Complicated
Here's The Code, Need Anything Else Just Ask\function pulse() for i = 1, 5 do rs.setOutput("right", true) rs.setOutput("left", true) sleep(4) end end local alarm = os.setAlarm(0) while true do local evt, arg = os.pullEvent("alarm") if arg == alarm then pulse() end end
Again, Untested, But That Above Should Work. Happy Coding : D
can a prograom run a program?
shell.run("filepath") --# Note that it should be a string
shell.run("filepath","arg1","arg2")
That code won't work, add another sleep at the and of the for loop. Otherwise the redstone signal may never be off. (because the ccomputer is too fast)