- Joined
- Jun 21, 2011
- Messages
- 119
Hello.
I'm new in vJASS, JASS etc...
I found a nice camera system to my map and now i need to make this trigger for all players, not red only. Someone can help me or change this code for all players not red only?
I'm new in vJASS, JASS etc...
I found a nice camera system to my map and now i need to make this trigger for all players, not red only. Someone can help me or change this code for all players not red only?
JASS:
function Trig_CameraForced_Actions takes nothing returns nothing
local camerasetup c = GetCurrentCameraSetup()
local player p = GetTriggerPlayer()
local real Dist = CameraSetupGetField(c, CAMERA_FIELD_TARGET_DISTANCE ) + 200
if (GetLocalPlayer() == p) then
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, Dist, 0.10)
call SetCameraField(CAMERA_FIELD_FARZ, 5000., 0.10)
endif
set p = null
set c = null
set Dist = 0.00
endfunction
function InitTrig_CameraForced takes nothing returns nothing
set gg_trg_CameraForced = CreateTrigger( )
call TriggerRegisterPlayerEvent(gg_trg_CameraForced, Player(0), EVENT_PLAYER_END_CINEMATIC)
call TriggerAddAction( gg_trg_CameraForced, function Trig_CameraForced_Actions )
set gg_trg_CameraForced = null
endfunction