• How to make a cinematic moving camera (view)
    16 replies, posted
Hello. I need to make a cinematic moving camera (view) that will be activated by all players under certain conditions. (like the cutscene). What you can use to create a camera on mup and switch players to it.
So something like this: GitHub
Thank you. It helped a little.
But how to apply this view to all players on the server?
But how to apply this view to all players on the server?
Loop through player.GetAll and call intro_play.
I don't understeand. I try to use this, but not worked. local allPlayers = player.GetAll() for k,v in pairs(allPlayers) do v:cam_start() end
You can always opt-in with https://www.gmodstore.com/scripts/view/2838/cinematic-intro
I do not need a paid script. Yes, I'm still not good at code, but I need to understand how this is done. It's important for me.
Did you try to read the code from github? Explain me the code For your surprise, after you read it, it makes sense!
Yes, I read the code. And I got the parts of the code that I need. "CalcWiew" works only with the client, and I'm not sure that it will work with all the players. (I'm not going to prove my understanding of the code.) I understand it, but not all the nuances
Just call intro_play() when you want to show the screen and intro_stop() when you want to stop it...It weren't that hard
Yes. I already realized that need to call through the network. And I'm trying to figure it out now.
Thanks for an answers. I found a solution
Thanks for share it for whoever in the future needs the answer
Sure. To apply the view to all players, I made a condition on the side of each client that takes a value (bollean) from the server using Net. -- SERVER's part   if SERVER then   -- Here is sanding value for turn on the view concommand.Add("setview", function()  local class_trial = true net.Start("StartCam") net.WriteBool(class_trial) net.Broadcast() end)  -- Here is sanding value for turn off the view concommand.Add("removeview", function()  local class_trial = false net.Start('StopCam') net.WriteBool(class_trial) net.Broadcast() end) end   -- CLIENT's part   if CLIENT then net.Receive("StartCam", function() cycle_status = net.ReadBool() end) -- Getting value for turn on   net.Receive("StopCam", function() cycle_status = net.ReadBool() end) -- Getting value for turn off   --Condition that takes a value.(The Cam_start () and Cam_Stop () functions switch the view I need on each side of the client.) hook.Add("Think","ConditionOfStartCam", function()  if (cycle_status == true) then cam_start() elseif(cycle_status == false) then cam_stop() end  end) end
Well done, and nice detail in adding comments
Sorry, you need to Log In to post a reply to this thread.