Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Forums

  1. OpenComputers

    1. Announcements

      OpenComputers official announcements.

      120
      posts
    2. Feedback

      Tell us what you think.

      347
      posts
    3. IRC

      #OC channel discussion
      irc.esper.net #oc

      26
      posts
  2. Code Central

    1. Support

      Ask for support from the OpenComputers community

      3132
      posts
    2. Showcase

      Showcase what you have created for OC. No 'malware' or other junk!

      2178
      posts
    3. Tutorials

      Help other users out. Please no 'false tutorials'

      100
      posts
  3. Addons & More

    1. Addons Mods

      Show off your OC addons mods

      204
      posts
    2. Architectures

      Discussions for Architectures

      172
      posts
    3. OpenEngineering Task Force

      Discussion board for the OETF documents

      66
      posts
  4. General

    1. Lounge

      Just lounge around or have an open discussion.

      296
      posts
    2. Forum Games

      Fight boredom!

      62
      posts
    3. Showcase

      Show off your creations! (not for your programs)

      124
      posts
    4. Servers

      A place to advertise your servers

      141
      posts
  5. Archives

    1. Public Archives

      OpenComputers public archive forum

      8
      posts
  • Topics

  • Posts

    • I'm thinking about trying to write up a program for open computers that would do the following: Detect a connected power generator such as a dynamo or coal generator. Detect a connected power storage unit such as an energy cell. Control the activation of the generator so that it can: Take note of when the generator starts, Display how full the power storage unit is, Display how much time has elapsed with the timer stopping when the storage is full. Display how much "fuel" has been used with the count stopping when the storage is full. (With fuel being whatever the generator requires to work.) The reason I want to do this is there are a number of generators that use the exact same fuel or generators that are in theory better because they are a higher tier but where there just isn't much information on what ones are actually better. Worse many of the mods that exist in the popular packs adjust their numbers and recipes every now and then, so even if there is a wiki that says X generator produces 40 RF per tick, that may be entirely off in the current or next version.
    • You might want to look into something like event.listen or event.timer. Basically every time an event occurs you can have a block of code run. Here's a small example. local event = require "event" local function printComp(ev, addr, ctype) print(string.format("component added: [type] %s [address] %s", ctype, addr)) end event.listen('component_added', printComp) -- some time later event.ignore('component_added', printComp) Here's a timer example. local event = require "event" local count = 0 local handle = event.timer(1, function() count = count + 1 print(string.format("timer tick #%d", count)) end, 10) -- # (how often, callback(), how many times)  
    • 98.3% of opencomputers seems to be a constant stream of errors... this is one of those times, this means that i will have to look for alternate solutions.... technically all i want to do is have a computer run a piece of code every so often but in a way that doesn't interfere with other programs i have running, in short i need a loop that won't act as while true do in the sense that it won't prevent me from doing anything else but it still runs in a loop. i've been overcomplicating things..
  • Popular Contributors

    Nobody has received reputation this week.

×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.