Name | Type | is_array | initial_value |
ad184 | button | No | |
AD191 | button | No | |
AD200 | button | No | |
Cities | integer | Yes | |
Death_Count | integer | Yes | |
dialsun | dialog | No | |
Kill_Count | integer | Yes | |
List | integer | No | |
Multiboard_Spots | integer | Yes | |
Player_Colors | string | Yes | |
Player_Count | integer | No | |
Playercolor | string | Yes | |
Timer | timer | No | |
timer55 | timer | No | |
Troops | integer | Yes | |
Warlordsdiplo | button | No | |
win | timerdialog | 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