Posted 08 September 2014 - 08:10 AM
Hello everybody!
I am a new in compuercraft, i have installed Tekkit few eeks ago and im trying to place a monitor with 4 buttons, 3 for redstone signal and 1 for on/off the another 3. I really understand just a little of programation, i am so confuse with comands, so i decided to ask for help here in the forum. i searched alot here and did not find something like my problem but i found this topic i readed and i test, then i change the buttons locations and size.
I have this
Well i need to change the buttons labels but when i do the buttons do not send the redstone signal, i want to add a tittle in the top, and add an on/off general button. I dont know if this is hard or simple to answer just let me know if is really hard then i will leave the project.
PD: Sorry if this is a stupid or repetitive topic, i really really do not what to do whit this code.
Minecraft version 1.6.4
Computercraft version 1.58
Note: Excuse my bad English but not completely mastered the language.
I am a new in compuercraft, i have installed Tekkit few eeks ago and im trying to place a monitor with 4 buttons, 3 for redstone signal and 1 for on/off the another 3. I really understand just a little of programation, i am so confuse with comands, so i decided to ask for help here in the forum. i searched alot here and did not find something like my problem but i found this topic i readed and i test, then i change the buttons locations and size.
I have this
–# load the touchpoint API
os.loadAPI("touchpoint")
–# intialize a new button set on the top monitor
local t = touchpoint.new("top")
–# add two buttons
t:add("left", nil, 4, 4, 12, 6, colors.red, colors.lime)
t:add("right", nil, 16, 4, 25, 6, colors.red, colors.lime)
t:add("back", nil, 16, 9, 25, 11, colors.red, colors.lime)
–# draw the buttons
t:draw()
while true do
–# handleEvents will convert monitor_touch events to button_click if it was on a button
local event, p1 = t:handleEvents(os.pullEvent())
if event == "button_click" then
–# p1 will be "left" or "right", since those are the button labels
–# toggle the button that was clicked.
t:toggleButton(p1)
–# and toggle the redstone output on that side.
rs.setOutput(p1, not rs.getOutput(p1))
end
end
Well i need to change the buttons labels but when i do the buttons do not send the redstone signal, i want to add a tittle in the top, and add an on/off general button. I dont know if this is hard or simple to answer just let me know if is really hard then i will leave the project.
PD: Sorry if this is a stupid or repetitive topic, i really really do not what to do whit this code.
Minecraft version 1.6.4
Computercraft version 1.58
Note: Excuse my bad English but not completely mastered the language.