BIS fnc playVideo: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 28: | Line 28: | ||
|p4= skipVarName (Optional): [[Array]] - [[missionNamespace]] variable to skip the video when variable is [[true]]. Default: "BIS_fnc_playVideo_skipVideo" |= | |p4= skipVarName (Optional): [[Array]] - [[missionNamespace]] variable to skip the video when variable is [[true]]. Default: "BIS_fnc_playVideo_skipVideo" |= | ||
|p5= bgColor (Optional): [[Array]] - Background color in format [r, g, b, a]. Default: [0,0,0,1] |= | |p5= bgColor (Optional): [[Array]] - Background color in format [r, g, b, a]. Default: [0,0,0,1] |= | ||
|p6= | |p6= keepAspect (Optional): [[Boolean]] - [[true]] to keep original video aspect ratio (background color will fill the void), [[false]] to stretch. Default: [[true]] |= | ||
| [[Boolean]] - [[true]] |= RETURNVALUE | | [[Boolean]] - [[true]] |= RETURNVALUE |
Revision as of 14:40, 2 March 2017
Description
- Description:
- Plays in-game video with a range of options. The function can be called or spawned. If spawned, scriptDone command can be used to see if video is stopped or finished. If called in scheduled environment, the next line of code will not process until the video is stopped or finished.
The function also calls "BIS_fnc_playVideo_started" and "BIS_fnc_playVideo_stopped" Scripted Event Handlers in missionNamespace (see BIS_fnc_addScriptedEventHandler)
The video can be stopped in variety of ways:- The function is called or spawned again with empty string "" for the video:
[""] call BIS_fnc_playVideo;
- The function is called or spawned again with another video, for example "\a3\missions_f_exp\video\exp_m04_v02.ogv"
["\a3\missions_f_exp\video\exp_m04_v02.ogv"] call BIS_fnc_playVideo;
- Default variable "BIS_fnc_playVideo_skipVideo" is set to true:
missionNamespace setVariable ["BIS_fnc_playVideo_skipVideo", true];
- Custom (skipVarName if defined) variable is set to true:
missionNamespace setVariable ["MyCustomSkipVar", true];
- The function is called or spawned again with empty string "" for the video:
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [content, size, color, skipVarName, bgColor, keepAspect] spawn BIS_fnc_playVideo
- Parameters:
- content: String - Full path to .ogv file
- size (Optional): Array - Screen size in format [x, y, w, h]. Default: [safeZoneX, safeZoneY, safeZoneW, safeZoneH]
- color (Optional): Array - Foreground color in format [r, g, b, a]. Default: [1,1,1,1]
- skipVarName (Optional): Array - missionNamespace variable to skip the video when variable is true. Default: "BIS_fnc_playVideo_skipVideo"
- bgColor (Optional): Array - Background color in format [r, g, b, a]. Default: [0,0,0,1]
- keepAspect (Optional): Boolean - true to keep original video aspect ratio (background color will fill the void), false to stretch. Default: true
- Return Value:
- Boolean - true
Examples
- Example 1:
_video = ["A3\Missions_F_EPA\video\A_in_intro.ogv"] spawn BIS_fnc_playVideo;
- Example 2:
_video = ["\a3\missions_f_exp\video\exp_m04_v01.ogv"] call BIS_fnc_playVideo;
- Example 3:
_video = "a3\missions_f_exp\video\exp_m07_vout.ogv"; _screen = "Land_TripodScreen_01_large_F" createVehicle (player modelToWorld [0,10,0]); _screen setObjectTexture [0, _video]; [_video, [10, 10]] call BIS_fnc_playVideo;
Additional Information
- See also:
- Functions Library
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note