Skip to main content

AreaDisableCameraControlForTransition

Description

You will need to keep this on until AreaIsLoading returns false for full effect.

function AreaDisableCameraControlForTransition(state) --[[ ... ]] end

Parameters

  • state: boolean - Disable camera control.

Return Values

None.

Example

Fade the screen out and move the player to the front of the boy's dorm, only unfading when the area is fully loaded.

-- go to the loading screen
CameraFade(1000, 0)
Wait(1000)

-- move the player without letting PlayerSetPosXYZArea affect the camera fade
AreaDisableCameraControlForTransition(true)
PlayerSetPosXYZArea(270, -110, 6, 0)
while AreaIsLoading() do
Wait(0)
end
AreaDisableCameraControlForTransition(false)

-- wait for all loading to finish
while IsStreamingBusy() do
Wait(0)
end
Wait(1000) -- wait an extra second for potential pop-in

-- fade the camera back in
CameraFade(1000, 1)

See Also