MrabEzreb 0 Posted April 15, 2016 Share Posted April 15, 2016 I currently have a tier 1 everything, powered by a stirling engine. The stirling engine gets hot and burns out I want to stop that I have a redstone card in the computer, and I thought, "hey, what if I made the computer control it's own engine!" so I tried, and failed, many, many times. Things I have tried: Using an autorun.lua file in the root directory Using a coroutine within said autorun.lua file using RC (the little bit that I could figure out, which was basically nothing) all of these things had the same problem: they run as the main thread, meaning that the computer is unusable whenever it is running. My next idea was to use events, but there's a problem there too, I don't see any "power_changed" events. What do you wonderful humans (sorry if you aren't human, I guess that's very inconsiderate of me) think that I could do to make this work? Thanks in advance. Ezreb out. Quote Link to post Share on other sites
0 nezd 2 Posted April 16, 2016 Share Posted April 16, 2016 process.load(path:string[, env:table[, init:function[, name:string]]]):coroutine Loads a Lua script from the specified absolute path and sets it up as a process. It will be loaded with a custom environment, to avoid cluttering the callers/global environment. This environment will have access to anything in the specified environment, or the default (top level) environment if none is given. (since OpenOS 1.6) path can also be a function, in which case env must be nil. If an init function is specified, that method is called the first time the resulting coroutine is executed, and run before the actual program is started. This allows fine-tuning of the programs environment. If a name is specified, that is the name the process will specify in process.running. It will be nil otherwise. http://ocdoc.cil.li/api:process?s[]=process Quote Link to post Share on other sites
I currently have a tier 1 everything, powered by a stirling engine.
The stirling engine gets hot and burns out
I want to stop that
I have a redstone card in the computer, and I thought, "hey, what if I made the computer control it's own engine!"
so I tried, and failed, many, many times.
Things I have tried:
all of these things had the same problem: they run as the main thread, meaning that the computer is unusable whenever it is running.
My next idea was to use events, but there's a problem there too, I don't see any "power_changed" events.
What do you wonderful humans (sorry if you aren't human, I guess that's very inconsiderate of me) think that I could do to make this work?
Thanks in advance.
Ezreb out.
Link to post
Share on other sites