Lets assume one wants to have the players view follow an entity of type unit which was assigned a command earlier.
The way to do this is to have an invisible player entity and to do a teleport to the coordinates of the unit on each tick.
It would be cool to be able to do this in a more convenient way via a defines.controller.follow type and a LuaPlayer::following
field or a similar mechanism.
Maybe also controls to restrict how the player can interface with the world while being in this mode would be great.
Kind regards
SixpackButtermilch
controller.follow
-
- Manual Inserter
- Posts: 3
- Joined: Wed Jun 22, 2016 8:16 am
- Contact:
Re: controller.follow
See LuaPlayer.set_controller with the cutscene controller.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.