- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
451 -
Joined
-
Last visited
-
Days Won
35
Posts posted by Molinko
-
-
I just saw the video MightyPirates (?Sangar) put out about the mod and a nice Q&A afterward. I was wondering about 2 things in particular if someone could help.
1.) What is 'Selene'? I saw some functional stuff going on and even some lambdas that weren't strings... What voodoo is this and may I have some master????
2.) Where can I hear about any future talks like this so I may attend
Thanks for lookin'
-
This is REALLY awesome! Thanks for this Cheers
-
I believe you might have to change an option in the config for it to work. Sorry I'm unsure atm, on the phone..
-
-
but your fish bowl is prone to a dense fog...
I wish i could shoot laser beams from my eyes..
-
Any chance of an update for the newer versions of OC?? 1.5.9 maybe?
-
This is actually the opposite. Computers neglect the side of a network message and server racks can be configured to output messages or broadcasts to just one side of the server rack.
[Edit] I was trying to address op from the context of his last sentence.
-
All of or the majority of libraries in openOS are removed from _G after its done booting. You must store the return from require to introduce libraries into a programs environment. Ie
local term = require("term")
-
When checking for the idle state be sure to compare the proper type! idle must be changed to "idle". idle is not defined as a var and us nil and thus the check will always be false.
-
I should mention I'm working on a basic navigation library now. I'll post here and in APIs when its ready
-
function move(
--// you're using incorrect syntax here.
curX = debug.getX()--
curY = debug.getY()
curZ = debug.getZ()-- You're setting values in the parameters field of a function call...
if curX = x and curY = y and curZ = z then
return
elseif curX < x then
robot.forward()
elseif curX > x then
robot back()
elseif curY < y then
robot.down()
elseif curY > y then
robot.up()
elseif curZ < z then
robot.left()
elseif curZ > z then
robot.right()
return move
end
)
Define functions like so..
-- declare local unless you intend global access.
local _x, _y, _z = getx(), gety(), getz() --get players pos. not real functions...
local function move(x, y, z) -- x, y ,z are parameters passed to a function
--// do movement...
end -- close the function declaration!
--// call with pos args..
move(_x, _y, _z) -- do the actual movement
Also note that lua is case sensitive. So Local ~= local. All lua standard libraries and keywords are lowercase. So 'local' not being the same as Local is giving you funny syntax errors...
-
That's great man. Sounds like fun. Lemme know if I can be of service
-
Hey guys, been away for a while. I'll post an API for displaying the images as stand alone data later tonight, didn't really think about it at the time lol.
Welcome back
-
Hey guys, been away for a while. I'll post an API for displaying the images as stand alone data later tonight, didn't really think about it at the time lol.
Welcome back
-
When the network connects check the abbreviated address against a list of known reachable host addresses.
-
I thinks its possible to have wake functions for the robot. Either through the redstone card or with the modem card. Pretty sure you can do it with modem. Something like modem.setWakeMessage(string)
Also redstone.setWakeThreshold(numberStrength)
-
-
Sorry man I posted for help on the same topic and no one really clarified it to me either. Good luck :/
-
its been added to the wiki
-
Should be the first method on the component wiki page.
http://ocdoc.cil.li/component:inventory_controller
component.inventory_controller.getInventorySize(#side)-- inv side number. This is sides.back for a robots own internal inventory I think
-
im pretty sure the main input events have a player name parameter ie.
print( table.unpack{ event.pull() } ) -- touch, key, click and walk I think all push the player name.
or print( event.pull()[5] ) -- i think its index [5] not sure though..
-
I have a solution that may require you to test personally but so far it will catch any wire change i throw at it regardless of pulse length..
local event = require "event" local computer = require "computer" local colors = require "colors" local sides = require "sides" local rs = require('component').redstone local e local bundle = (function() -- init bundle with states local bundle = {} for side = 0, 5 do bundle[side] = {} for color = 0, 15 do bundle[side][color] = rs.getBundledInput(side, color) end end return bundle end)() local handler = { redstone_changed = function(e) local side, state = e[3], nil for color = 0, 15 do state = rs.getBundledInput(side, color) if state ~= bundle[side][color] then bundle[side][color] = state computer.pushSignal('wire_changed', e[2], sides[side], colors[color], state) end end end, wire_changed = function(e) print(e[1],e[2],e[3],e[4],e[5]) end } while true do e = {event.pull()} if handler[e[1]] then handler[e[1]](e) end end
hope this helps.
-
I see your point. And your solution is simlilar to what i would have proposed which would be something like a coroutine constantly scanning the state of each colored wire along with an event listener. When the redstone_changed event fires the coroutine could queue its own redstone event with the parameters you desire. just a thought.
-
Are you using a teir 2 Redstone card? Only the teir2 card or the redstone io block can set and get the value of a color cable. Plz test for yourself in case just plain wrong.. Hope that helps
Selene [Better Than Minecon]
in Programming
Posted
Thanks for the heads up