I have a few questions about programming. I have wireless card on both, open port 123 on the modem and know to use =event.pull("modem") to wait for a message on the robot and then use component.modem.broadcast(123, "hello") to broadcast a message. but the message its only a message. I am wondering how I can make the robot understand it is a command or to execute a program on it.
second question is the command robot.forward(), it lags when i use that same command multiple times in a row.. my robot moves 4 blocks forward and then go up and turn a few times to go through a maze to a room. right now i am typing robot.forward() 4 times to make it move 4 blocks forward. i see on the robot API page for moving forward is robot.forward(): boolean[, string] . Don't know what boolean or string is, not that you need to explain. I just don't know how to input the amount of forward movement I want.
third question is, I want the robot to check slot 1, and see if there are 3 wither skeleton skulls, if there are then proceed to move into the room. i tried getStackInInternalSlot(1), I don't know how to use that info to compare the item in the slot. i am really clueless figuring out how it is suppose to work. Tried looking at other people's program to use in mine but can't understand them. not sure how to make robot recognize an item like "wither skeleton skull".
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I have a few questions about programming. I have wireless card on both, open port 123 on the modem and know to use =event.pull("modem") to wait for a message on the robot and then use component.modem.broadcast(123, "hello") to broadcast a message. but the message its only a message. I am wondering how I can make the robot understand it is a command or to execute a program on it.
second question is the command robot.forward(), it lags when i use that same command multiple times in a row.. my robot moves 4 blocks forward and then go up and turn a few times to go through a maze to a room. right now i am typing robot.forward() 4 times to make it move 4 blocks forward. i see on the robot API page for moving forward is robot.forward(): boolean[, string] . Don't know what boolean or string is, not that you need to explain. I just don't know how to input the amount of forward movement I want.
third question is, I want the robot to check slot 1, and see if there are 3 wither skeleton skulls, if there are then proceed to move into the room. i tried getStackInInternalSlot(1), I don't know how to use that info to compare the item in the slot. i am really clueless figuring out how it is suppose to work. Tried looking at other people's program to use in mine but can't understand them. not sure how to make robot recognize an item like "wither skeleton skull".
Link to post
Share on other sites