Cam lock -API

Post Reply
Chocolatetthunder
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Sat Sep 03, 2016 12:00 am
Contact:

Cam lock -API

Post by Chocolatetthunder »

is it currently possible to lock my camera onto a player?

I am making a spectator option in my scenario, and would like to be able to lock my camera onto other players characters. I think adding this functionality to the api would greatly benefit Scenario creation.
3Ra Gaming Owner
join us on discord @ http://www.3RaGaming.com/discord

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Cam lock -API

Post by aubergine18 »

You can teleport player X to position of player Y in an on_tick event (maybe every 10 ticks or so to prevent too much network spamming). I have no idea if this will work when player is in god mode or ghost mode. http://lua-api.factorio.com/latest/LuaC ... l.teleport
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Cam lock -API

Post by ssilk »

Moved from Suggestions to Modding Interface Requests.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Implemented mod requests”