Name | Type | is_array | initial_value |
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 == "default" 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