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

Secret Movie Operation

Started by dexter9, 12 January 2013 - 04:57 AM
dexter9 #1
Posted 12 January 2013 - 05:57 AM
Hi
I run a 24/7 tekkit server and with tekkit is computercraft. I made a cinema to view the secret starwars clip and i was wondering how i could control the screen from the other side of the cinema. Is there any programs that would let me do this through cables or rednet?
Thanks in advance
PixelToast #2
Posted 12 January 2013 - 06:10 AM
what you want is a remote console thing, i dont know any specific ones .-.
dexter9 #3
Posted 12 January 2013 - 06:16 AM
precisely.
I tried making a few but they never worked :L
W00dyR #4
Posted 12 January 2013 - 06:18 AM
I might sound stupid, but can't you just make a computer behind the screen, open rednet, make it play the movie when it receives a certain rednet message which is sent by a different computer (the remote control pretty much)
Cranium #5
Posted 12 January 2013 - 06:34 AM
Sending code:

while true do
  print("Press ENTER to start movie")
  local events = {os.pullEvent()}
  if events[1] == "key" and events[2] == 28 then
    rednet.open("<side>")
    rednet.broadcast("RUN MOVIE")
    rednet.close()
  end
end
Receiver code:

while true do
  rednet.open("<side>")
  local id,msg,dist = rednet.receive()
  if msg == "RUN MOVIE" then
    shell.run("monitor <side> secret/alongtimeago")
  end
end

This will run the movie when you press ENTER on the 'projector' computer. Just change the <side> to the side the modem is on and the side that the monitor is on.
dexter9 #6
Posted 12 January 2013 - 07:12 AM
Thank you this is precisely what i was looking for
mrzpicklez #7
Posted 11 April 2013 - 05:24 PM
love the code and it works but i am getting an error "rednet:25: string expected after i press enter… is there something that i am not doing right
TheOddByte #8
Posted 12 April 2013 - 09:37 AM
You don't actually use <side> do you.. If so then change it to bottom,top,left,right,front or back.
Else I don't know what's wrong..
Did you use exactly the code Cranium posted or what?
Since I don't see anything wrong with that..
mrzpicklez #9
Posted 12 April 2013 - 06:24 PM
we put the correct side and the movie does play it just keeps giving an error rednet:25: string expected but there is no line 25 so it cant be that and someone on our server that is great with CC helped me set it up and we are both lost
LazyBoot #10
Posted 13 April 2013 - 02:19 AM
According to the wiki rednet.close also requires a side (the error references line 25 in the rednet api file, not your program)
mrzpicklez #11
Posted 15 April 2013 - 05:07 AM
ahhhh ok cool thanks that fixed it