• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Camera zoom system for 1.29 or classic

function gg_trg_CameraZoom_Conditions takes nothing returns boolean
local real r
local string s
if GetLocalPlayer() == GetTriggerPlayer() then
set s = SubString(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))
set r = S2R(s)

if s == "def" then
set r = 1650
endif

if s == "med" then
set r = 2075
endif

if s == "high" then
set r = 2500
endif

call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, r, 0.00)
call SetCameraField(CAMERA_FIELD_FARZ, 100000000.00, 0)
endif
return false
endfunction

//===========================================================================
function InitTrig_CameraZoom takes nothing returns nothing
local trigger trig = CreateTrigger()
local integer i = 0
loop
exitwhen i == bj_MAX_PLAYERS
call TriggerRegisterPlayerChatEvent(trig, Player(i), "-zoom ", false)
set i = i + 1
endloop
call TriggerAddCondition(trig, Condition(function gg_trg_CameraZoom_Conditions))

call SetTerrainFogExBJ( 0, 10000000.00, 1000000.00, 0.5, 100, 100, 100 )
endfunction
 
i found a system camera zoom but it's in gui, also maybe you guys can do it with gui also please remove number enter from these camera system, just keep def, med and high key word for changing zoom, also please change it something like when we use mouse's wheel, the zoom comes back to what we set.
 
Back
Top