Hi
I would like the ability to read a robot's speed in order to determine if a robot is working or waiting / hovering for something such as;
- The inventory being full in a spidertron
- A player standing on a ghost entity it is trying to build
- Cases like where the robot is trying to build a train on top of a ghost rail that is just outside of construction range or does not have items to build it
If I could check robot.speed and observe it to be zero I would be well on the way to knowing that a robot is not active.
Prior to 2.0, code, I was checking every 90 ticks and tracking robot positions to see if they have moved, with the 2.0 bot optimizations that has been thrown out the window a little bit as it is less accurate given that robots update less frequently.
Add robot.speed [R]
Re: Add robot.speed [R]
Rethinking this... It suffers from the same issue due to the update frequency.
I am going to try watching orientation over a few checks and making a determination on that.
I am going to try watching orientation over a few checks and making a determination on that.
Re: Add robot.speed [R]
I would've expected this to be covered by status. Don't robots have that? Seems like it would be more informative than just speed, since robots always move at maximum possible speed anyway.
Re: Add robot.speed [R]
Hey mate
Robots do not have `status`. That would be a better alternative as it would be the game saying everything is okay(robots are doing something) rather than needing to try and determine it at lua stage.
I have deemed it necessary to watch an attribute of the robots over a few ticks if this determination logic is to remain in lua.
Robots do not have `status`. That would be a better alternative as it would be the game saying everything is okay(robots are doing something) rather than needing to try and determine it at lua stage.
I have deemed it necessary to watch an attribute of the robots over a few ticks if this determination logic is to remain in lua.