2 posts
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
116 posts
Location
At my Computer coding for the Computer in my Computer
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
166 posts
Location
Don't look behind you..
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.
116 posts
Location
At my Computer coding for the Computer in my Computer
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.
166 posts
Location
Don't look behind you..
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".
209 posts
Location
In your fridge.
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.
116 posts
Location
At my Computer coding for the Computer in my Computer
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.
166 posts
Location
Don't look behind you..
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 :)/>/>)
116 posts
Location
At my Computer coding for the Computer in my Computer
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)/>/>
166 posts
Location
Don't look behind you..
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.
2 posts
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)/>/>
116 posts
Location
At my Computer coding for the Computer in my Computer
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
209 posts
Location
In your fridge.
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.
116 posts
Location
At my Computer coding for the Computer in my Computer
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