Server player cam

This is the place to request new mods or give ideas about what could be done.
Post Reply
Nick-Nack
Inserter
Inserter
Posts: 36
Joined: Tue May 31, 2016 11:03 am
Contact:

Server player cam

Post by Nick-Nack »

Hi there!

I'm looking for a way to automatically follow a different player for a multiplayer server and live streaming. Even better if the cam automagically chooses which player to focus on, but just something where I can click a button and the camera automatically follows a selected player would be great.

Are there any mods like this? if not, would this be theoretically possible via mod?

Best
Daniel

kreatious
Inserter
Inserter
Posts: 20
Joined: Sat Jul 15, 2017 1:59 am
Contact:

Re: Server player cam

Post by kreatious »

I haven't bothered looking for a mod like this.

But this type of mod is theoretically possible (please note that I'm not volunteering to actually write the mod.). Try pasting some of these commands in game.

Initialization:

Code: Select all

/c follow = game.player
webcam = game.player.gui.left.add{type="camera", name="web", position=follow.position}
webcam.style.minimal_width = 100
webcam.style.minimal_height = 100

script.on_event(defines.events.on_tick, function(e)
  if follow == nil or not follow.valid then
    webcam.style.visible = false
    return
  end
  webcam.style.visible = true
  webcam.position = follow.position
end)
Follow selected object:

Code: Select all

/c follow = game.player.selected
Follow specific player

Code: Select all

/c follow = game.players["kreatious"]
Hide webcam

Code: Select all

/c follow = nil

Post Reply

Return to “Ideas and Requests For Mods”