Arma 3 Scripting

Command in Camera Control

camPreload

Also available as Markdown and JSON, or read the original wiki page.

Description

Preloads the scene for the prepared camera with given timeout after which preloading is aborted. Max timeout is 30 seconds. Timeout of 0 means max timeout of 30 seconds as well.

Note

This command will read prepared params set with camPrepareFOV, camPreparePos and camPrepareTarget, so no camCommitPrepared is necessary. If camPrepareFOV is not set, the default value is 1. If camPrepareTarget (for direction) and camPreparePos (for position) are not set, current direction and position of the camera are used. The prepared camera preload will preload main camera as well. cameraEffect is not necessary

Syntax

camera camPreload timeout

Parameters:

Returns: Nothing

Examples

Example 1

_camera camPreload 5;

Example 2

Preload camera around player to avoid stuttering on optics zooming:

0 spawn 
{
    _cam = "camera" camCreate (player selectionPosition "camera");
    for "_i" from 0 to 359 do
    {
        _cam setDir _i;
        _cam camPrepareFov 0.25;
        _cam camPreload 0;
        waitUntil { camPreloaded _cam };
    };
    camDestroy _cam;
};

See also

camPreloaded · preloadCamera