Hello everyone,
I want to write an autopilot script. I wanted a way to send "clean", valid player actions to the game. A few examples of actions I need are: walk one block north; use slot1 item on tile X,Y (given tile is within range). I'm trying to avoid "cheat" actions like teleport or spawn items.
Is it possible to control what actions the player does through the Lua API?
I couldn't find any possible functions by inspecting the objects in console (specifically game.player).
Thank you very much!
Controlling the player through API
Re: Controlling the player through API
Code: Select all
/c game.local_player.walking_state = {walking = true, direction = defines.direction.north}