View Full Version : Simple camera question
06-14-2009, 06:33 AM
Just a noob question here guys, how do I zoom the camera out for a player? I don't like the camera being zoomed in so much, and my map is large, so I need the camera zoomed out for all players.
06-14-2009, 07:18 AM
Time - Every 0.05 seconds of game time
For each (Integer A) from 1 to 12
Loop - Actions
Camera - Set Player (IntegerA)'s camera Height Offset to Value over 0.1 seconds
The Player (IntegerA) is from (Player - Convert Player to Index) and the whole action is "Camera - Set Camera Field (Timed)".
06-14-2009, 02:13 PM
I don't think that's right.
You want target distance, not height offset.
Also, since using the mousewheel, insert or delete keys causes the camera to revert back to the default, you'll need to either keep applying it constantly, or give the players a chat command. (The ever popular -zoom x)
06-16-2009, 02:43 PM
Im not sure if that is possible ....
06-16-2009, 03:53 PM
Of course it's possible
Here's how the zoom command from my map looks
function chatZoom takes integer p, real x returns nothing
if x<500 then //set limits on how far the player can zoom in and out
elseif x>4500 then
if GetLocalPlayer()==Player(p) then
function FuncChatEvent takes nothing returns nothing
local integer p = GetPlayerId(GetTriggerPlayer())
local string s = GetEventPlayerChatString()
local real arg1
local integer arg2
// Other chat commands omitted
if SubString(s,0,5) == "-zoom" then
set arg1 = S2R(SubString(s,6,StringLength(s)))
// Trigger initialization junk omitted
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO