View Full Version : Simple camera question
bobo11
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.
Cheers
Pharaoh_
06-14-2009, 07:18 AM
Camera
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
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)".
Storyyeller
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)
ALiEN95
06-16-2009, 02:43 PM
Im not sure if that is possible ....
Storyyeller
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
set x=500
elseif x>4500 then
set x=4500
endif
if GetLocalPlayer()==Player(p) then
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,x,0)
endif
endfunction
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)))
call chatZoom(p,arg1)
endif
endfunction
// Trigger initialization junk omitted
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
Search Engine Optimization by
vBSEO 3.5.1 PL2