Skip to content

CAU_animate_fnc_add

ConnorAU edited this page May 12, 2020 · 2 revisions

Arguments: Global Effect: Local

Definition:

Adds a new animation task on the client where the function was executed

Syntax 1:

  • Target (Object, Control or String)
  • Class (String) Name of an animation preset found in CfgAnimatePAA (example)

Syntax 2:

  • Target (Object, Control or String)
  • Parameters (Array)
        0: Path (String or Array of Strings) File path or marker class. Use an array of paths to support object texture layers.
        1: Frames (Array)
            0: Minimum frame index (Number)
            1: Maximum frame index (Number)
        2: Interval (Number) Seconds between frame iterations
        3: Mode (Number) Animation behaviour
            0 - start at min frame, reach max frame, return to min frame, repeat
            1 - start at min frame, reach max frame, reverse frame by frame back to min frame, repeat
            2 - start at min frame, reach max frame, end loop (texture stays on final frame)

Example 1:

[_vehicle,"SomeAnimationClass"] call CAU_animate_fnc_add;

Example 2:

// View this example in the demo release
[ 
    uiNamespace getVariable ["CAU_animate_demo_ctrl",controlNull], 
    [ 
        "\a3\boat_f_destroyer\destroyer_01\data\destroyer_01_n_0%1_co.paa", // Image path. %1 specifies where the iteration value is in the file name. 
        [3,7], // Sub-set of frames selected for a shorter animation
        0.5, // 0.5 second interval between frame iterations
        1 // forward-backward animation mode
    ] 
] call CAU_animate_fnc_add;