Name | Type | is_array | initial_value |
All_players | force | No | |
FrostFlashdamage | group | No | |
Tuskarr_Rescue | group | No |
function Zoom_Conditions takes nothing returns boolean
return SubString(GetEventPlayerChatString(), 0, StringLength("-zoom ")) == "-zoom "
endfunction
function Zoom_Actions takes nothing returns nothing
local integer i = S2I(SubString(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString())))
if GetLocalPlayer() == GetTriggerPlayer() then
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, i, 0 )
endif
endfunction
//===========================================================================
function InitTrig_zoom_test takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 11
call TriggerRegisterPlayerChatEvent( t, Player(i), "-zoom ", false )
set i = i + 1
endloop
call TriggerAddCondition( t, Condition( function Zoom_Conditions ) )
call TriggerAddAction( t, function Zoom_Actions )
endfunction