Page 1 of 1

controller.follow

Posted: Wed Jun 22, 2016 9:15 am
by SixpackButtermilch
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

Re: controller.follow

Posted: Mon Oct 07, 2019 8:39 am
by Bilka
See LuaPlayer.set_controller with the cutscene controller.