4 posts
Posted 07 August 2012 - 03:42 PM
Hey all,
I have created a menu that has all my lighting and power on it as well as the option to play star wars on the screen next to it. Although how do I make it so that I can still use the computer as well as playing the film?
Sluggy.
PS. I have used the search bar but couldnt seem to find anything. And anyone know if there are any more film to download for it?
436 posts
Posted 07 August 2012 - 04:59 PM
Hmm. Well I don't know enough about it to help here, but parallel can be used for something like this. But, to do so would require. . . os.run I think, and I REALLY don't know enough about that to help. But, maybe you can figure it out where I failed.
3790 posts
Location
Lincoln, Nebraska
Posted 07 August 2012 - 05:14 PM
What you can do is this:
function swMovie()
local mon = peripheral.wrap("side")--enter which side the monitor is on
mon.run("secret/alongtimeago")--not too sure about "mon.run" here...
end
parallel.waitForAny(yourfunctionformenu,swMovie)
I'm not too sure on the mon.run part of that, but I think it's right… ;)/>/>
864 posts
Location
Sometime.
Posted 07 August 2012 - 05:16 PM
Help has arriven…? – Is that a word?
function menu(blah) -- Menu code (ALL OF IT)
end
function starwars()
shell.run("monitor", "SIDE", "secret/alongtimeago")
end
while true do
parallel.waitForAny("menu", "starwars")
end
99 posts
Location
Scotland!
Posted 07 August 2012 - 05:19 PM
try using another computer connected to your personal one, that computer will run waiting to detect a redstone signal, then once it does it starts star wars.
something like this
--your personal PC
rs.setoutput( "back", true )
-- the computer connected to the monitor, call the program "startup"
os.pullEvent( redstone )
--run the star wars program on the monitor
os.reboot()
3790 posts
Location
Lincoln, Nebraska
Posted 07 August 2012 - 05:20 PM
Help has arriven…? – Is that a word?
function menu(blah) -- Menu code (ALL OF IT)
end
function starwars()
shell.run("monitor", "SIDE", "secret/alongtimeago")
end
while true do
parallel.waitForAny("menu", "starwars")
end
Yours is much nicer than mine…. ;)/>/>
436 posts
Posted 07 August 2012 - 05:21 PM
Okay, thought a bit, researched some.
Problems with waitForAny: Will kill menu when movie has played out. Better to use waitForAll and have that in a loop. Movie menu option kills the loop and brings both back.
864 posts
Location
Sometime.
Posted 07 August 2012 - 05:26 PM
Okay, thought a bit, researched some.
Problems with waitForAny: Will kill menu when movie has played out. Better to use waitForAll and have that in a loop. Movie menu option kills the loop and brings both back.
Mine is in a loop
the parallel.waitForAny(funct_a, funct_ ;)/>/>
Wait for any won't kill it and, IMO, its better.