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

[xieve]

Members
  • Content Count

    6
  • Joined

  • Last visited

Posts posted by [xieve]

  1. I never dealt with computronics, but what you need to do to let a script take args is the following:

    local args = {...}
    
    for k,v in pairs(args) do
    	print("Arg "..k..": "..v)
    end

    This would print the args, e.g.:

    argsTest blah foo blip

    would print

    Arg 1: blah
    Arg 2: foo
    Arg 3: blip

    So, as you can see, {...} is an array-style table.

    And, btw, to access certain values do args[<number>] without <>.

  2. Hmm. What about an adapter connected to your computer adjacent to a command block? That would need two extra blocks, but seems like the best way for what you want. In the new wiki, sadly, there's (yet?) no documentation on the CommandBlock component, but in the old one, to be precise, here, is a page about it, and the methods probably still work.

    EDIT: They DO work, but this needs to be activated in the config file first. (enableCommandBlockDriver=true)
    EDIT2: What do you mean by "it outputs the commands" though?

  3. I wanted to dig (or "swing" ;)) the block below the robot, which, (partially) according to the wiki, would be

    local component = require("component")
    local sides = require("sides")
    component.robot.swing(sides.down)

    but it dug the block in front of the robot. Partially because it says

    Quote

    swing(side:number):boolean[, string]
    Lets the robot use the currently equipped item in the tool slot against the block or space directly in front of the robot. Returns true if successful (may take time depending on block being interacted with - e.g.. Obsidian takes time to mine). Returns false if the operation fails with a description of why it failed.

    Now what I think is that the side:number was accidentally added there, and the component.swing() function actually has no input value, which would just result in ignoring  any passed values. Though I'm not sure if I should do a feature request on this, maybe I just did something wrong.
    Here go my specs:

    • Minecraft 1.10.2
    • Forge 12.18.3.2185
    • OpenComputers 1.6.2.7

    If there's any other information which could be useful, just tell me.

×
×
  • Create New...

Important Information

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