JASS:
function Trig_bla_Func001C takes nothing returns boolean
return true
endfunction
function Trig_bla_Actions takes nothing returns nothing
local handle gg_cam_Camera_001
if ( GetCurrentCameraSetup() != gg_cam_Camera_001 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(0), 0 )
endif
endfunction
//===========================================================================
function InitTrig_Untitled_bla takes nothing returns nothing
set gg_trg_bla = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_bla, 0.02 )
call TriggerAddAction( gg_trg_bla, function Trig_bla_Actions )
endfunction
So being a Jass newbie I simply ripped a few functions after converting them from GUI. At first I didn't know I had to declare gg_cam_Camera_001 so I did and now I get syntax error 'cannot convert handle to camerasetup' but without handle I can't compare currentcamera to camera_001.
I'm missing something fundamental, what is it?
EDIT: Also, I converted a gui trigger with only the event 'every 0.02 secs of gametime'. What has the first function got to do with anything?
FINAL EDIT: Ok I fixed it. Woot to me. Lol that first function was useless wtf??
JASS:
function Trig_bla_Actions takes nothing returns nothing
local camerasetup g = gg_cam_Camera_001
if ( GetCurrentCameraSetup() != g ) then
call CameraSetupApplyForPlayer( true, g, Player(0), 0 )
endif
endfunction
//===========================================================================
function InitTrig_bla takes nothing returns nothing
set gg_trg_bla = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_bla, 0.01 )
call TriggerAddAction( gg_trg_bla, function Trig_bla_Actions )
endfunction
Last edited: