Controlling Resonant Energy Cells
#1
Posted 11 March 2014 - 03:31 AM
And what all would I need to know to do this, if it is possible?
#2
Posted 11 March 2014 - 06:25 AM
#4
Posted 11 March 2014 - 10:17 AM
Edited by Anavrins, 11 March 2014 - 10:28 AM.
#5
Posted 11 March 2014 - 11:32 AM
#6
Posted 11 March 2014 - 05:14 PM
Is it possible to check how much energy is being drawn from the cells?
#7
Posted 11 March 2014 - 06:35 PM
#8
Posted 11 March 2014 - 08:12 PM
for k,v in pairs(peripheral.getMethods("side") do
print(v)
end
Off the top of my head I think the method that gets energy is getStoredEnergy()
Also, I don't remember if you can throttle the input and output but you can turn output off by supplying a Redstone signal if your cells are set up for it.
Edited by OReezy, 11 March 2014 - 08:15 PM.
#9
Posted 11 March 2014 - 09:46 PM
Edited by CometWolf, 11 March 2014 - 09:46 PM.
#11
Posted 12 March 2014 - 02:47 PM
I want to have a computer display the power levels of each of my energy cells, of which I have 3, how do?
#12
Posted 12 March 2014 - 07:35 PM
local var = peripheral.wrap("side")
You can do the same thing with a table.local table = {}
table[1] = peripheral.wrap("side")
This does the exact same thing as before, but instead of saving the wrapped peripheral inside the variable named "var" you are saving it to an index in a table. If you want to call a method for a peripheral wrapped this way, you simply write it the same way but use the table index instead.Note: If you are using wired modems and network cable, instead of a side you want to use the name of the peripheral. The name you need to use will be displayed in your chatbox in Minecraft when you enable the modem connected to the peripheral.
table[1].method()You can also use keys if you prefer, but I feel indexes are easier to code for. Now that we have our table of peripherals, you can use a loop to iterate through them all.
for i = 1, #table do table[i].method() end
#13
Posted 12 March 2014 - 07:58 PM
#14
Posted 12 March 2014 - 08:07 PM
#15
Posted 12 March 2014 - 08:45 PM
for i = 1, #table do table[i].method() end
And then?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












