This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Plazter12's profile picture

running the secret movie by a press of a buttom

Started by Plazter12, 01 September 2012 - 04:57 PM
Plazter12 #1
Posted 01 September 2012 - 06:57 PM
Hello guys!
im working on makeing a cinema in minecraft running the secret movie in computer craft, and i cant get it to work.
What i have tryed to do so far is following:

while true do
rs.getInput("left")
  then do
shell.run("monitor", "right", "thesecretmovie that i wont reveal here")
end
end
can some 1 please help me make it work? i would appreciate it alot :)/>/>
Thanks!
Regard Plazter
Matrixmage #2
Posted 01 September 2012 - 07:13 PM
This should work, I haven't tested though



while true do
if rs.getInput("left") then

shell.run("monitor", "right", "thesecretmovie that i wont reveal here")
end
end
Teraminer #3
Posted 01 September 2012 - 07:17 PM
I think what you need is something like this:

while true do
if rs.getInput("left") == true
then do
shell.run("monitor", "right","/s*****/alo*******go")
end
end
P.S. I made that with no testing so there is a chance it might not work.
Matrixmage #4
Posted 01 September 2012 - 07:18 PM
I'm not positive whether or not you need the "== true" but I have a hunch that you might not… but try both.
Teraminer #5
Posted 01 September 2012 - 07:20 PM
Yeah but I am not sure so I writed it, if it does not work try with 1 "=" or with no "== true".
Lettuce #6
Posted 01 September 2012 - 07:20 PM
I've never done something like this, but you can try:

while true do
   if rs.getInput("left") then
   shell.run("monitor","right", "secretmovie")
   end
end
Should work. os.pullEvent("redstone") might work as well, if you only want to play this one.

*edit: I've been ninja'd. three times.
Matrixmage #7
Posted 01 September 2012 - 07:22 PM
Yeah but I am not sure so I writed it, if it does not work try with 1 "=" or with no "== true".

You always have to use two "=" when comparing something, so one "=" would never work.
Teraminer #8
Posted 01 September 2012 - 07:22 PM
Acualy now that I saw your script it looks right to me.

(we are both online aren't we :)/>/>)
Matrixmage #9
Posted 01 September 2012 - 07:23 PM
I've never done something like this, but you can try:

while true do
   if rs.getInput("left") then
   shell.run("monitor","right", "secretmovie")
   end
end
Should work. os.pullEvent("redstone") might work as well, if you only want to play this one.

*edit: I've been ninja'd. three times.

ya sorry :)/>/>

Acualy now that I saw your script it looks right to me.

(we are both online aren't we :)/>/>)

yep B)/>/>
Teraminer #10
Posted 01 September 2012 - 07:23 PM
I've never done something like this, but you can try:

while true do
   if rs.getInput("left") then
   shell.run("monitor","right", "secretmovie")
   end
end
Should work. os.pullEvent("redstone") might work as well, if you only want to play this one.

*edit: I've been ninja'd. three times.
Acualy this looks right to me.
Plazter12 #11
Posted 01 September 2012 - 07:24 PM
I've never done something like this, but you can try:

while true do
   if rs.getInput("left") then
   shell.run("monitor","right", "secretmovie")
   end
end
Should work. os.pullEvent("redstone") might work as well, if you only want to play this one.

*edit: I've been ninja'd. three times.

awesome man! that was easy to fix :)/>/>!

EDIT: Thanks to all for dropping in and drop me some help! B)/>/>
Matrixmage #12
Posted 01 September 2012 - 07:26 PM
I've never done something like this, but you can try:

while true do
   if rs.getInput("left") then
   shell.run("monitor","right", "secretmovie")
   end
end
Should work. os.pullEvent("redstone") might work as well, if you only want to play this one.

*edit: I've been ninja'd. three times.
Acualy this looks right to me.

that's the same as mine
Lettuce #13
Posted 01 September 2012 - 07:28 PM
We are all posting at the same time. This person has several suggestions, all or none of which should work. You don't need "== true" it's unnecessary. It works, but is redundant.
if rs.getinput("left") == true do
returns exactly the same as:
if rs.getinput("left") do

I learned that a short while back.

*edit: MatrixMage, I posted that about 3 seconds after yours, when I saw no replies. I didn't try to steal it, we had the same idea at the same time.
Matrixmage #14
Posted 01 September 2012 - 07:29 PM
We are all posting at the same time. This person has several suggestions, all or none of which should work. You don't nee "== true" it's unnecessary. It works, but is redundant.
if rs.getinput("left") == true do
returns exactly the same as:
if rs.getinput("left") do

I learned that a short while back.

that's what I thought, I had seen it on some other code I saw here