BIS fnc fadeEffect: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "\|seealso= ([^ ]+)(\]\]|\}\}), *(\[\[|\{\{)" to "|seealso= $1$2 $3")
 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|eff= local


|1.00|= Game version
|gr1= GUI
____________________________________________________________________________________________


| <pre>/*
|exec= spawn


Description:
|descr= Easily carry out complex fading. Default values will be used if parameters are not defined or set to nil.
Easily carry out complex fading. Default values will be used if parameters aren't defined or set to nil.


Parameter(s):
|s1= [fadeInOrOut, blackOrWhite, duration, blur, music, ending, success] spawn [[BIS_fnc_fadeEffect]]
_this select 0 (Optional): NUMBER - 0: fade out, 1: fade in
_this select 1 (Optional): STRING - "BLACK": black fade, "WHITE": white fade
_this select 2 (Optional): NUMBER - Duration of the fade in seconds
_this select 3 (Optional): NUMBER - 1: blur while fading, 0: don't use blur
_this select 4 (Optional): STRING - String of the music track you wish to play (will only work with fading in)
_this select 5 (Optional): STRING - Ending you wish to use (will only work with fading out)
_this select 6 (Optional): NUMBER - Use 0: failMission, 1: endMission


Returns:
|p1= fadeInOrOut: [[Number]] - (Optional, default 1) 0 to fade out, 1 to fade in
Nothing.
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= fadeColor: [[String]] - (Optional, default "BLACK") '''case-sensitive''' can be "BLACK" or "WHITE"
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_fadeEffect]]; --> |= Syntax
|p3= duration: [[Number]] - (Optional, default 3) fade duration in seconds


|p1= |= Parameter 1
|p4= blur: [[Number]] - (Optional, default 0) 0 to not blur, 1 to blur (blur-in for fade-in, blur-out for fade-out)


| |= Return value
|p5= music: [[String]] - (Optional, default "") '''only for fade-out''' music class name defined in [[Description.ext#CfgMusic|CfgMusic]]
____________________________________________________________________________________________


|x1= <code></code> |=
|p6= ending: [[String]] - (Optional, default "") "" to not end the mission, else a value compatible with [[endMission]] or [[failMission]]. '''Will end mission only for the local player'''
____________________________________________________________________________________________


| |= See also
|p7= success: [[Number]] - (Optional, default 1) '''if ''ending'' != ""''' 1 to end mission with success, 0 to fail mission


}}
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>[1, "WHITE", 5, 1] spawn BIS_fnc_fadeEffect;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[endMission]] [[failMission]] [[BIS_fnc_endMission]] [[BIS_fnc_endMissionServer]] [[titleCut]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:fadeEffect}}]]
[[Category:Functions|{{uc:fadeEffect}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:fadeEffect}}]]

Latest revision as of 13:00, 1 July 2022

Hover & click on the images for description

Description

Description:
Easily carry out complex fading. Default values will be used if parameters are not defined or set to nil.
Execution:
spawn
Groups:
GUI

Syntax

Syntax:
[fadeInOrOut, blackOrWhite, duration, blur, music, ending, success] spawn BIS_fnc_fadeEffect
Parameters:
fadeInOrOut: Number - (Optional, default 1) 0 to fade out, 1 to fade in
fadeColor: String - (Optional, default "BLACK") case-sensitive can be "BLACK" or "WHITE"
duration: Number - (Optional, default 3) fade duration in seconds
blur: Number - (Optional, default 0) 0 to not blur, 1 to blur (blur-in for fade-in, blur-out for fade-out)
music: String - (Optional, default "") only for fade-out music class name defined in CfgMusic
ending: String - (Optional, default "") "" to not end the mission, else a value compatible with endMission or failMission. Will end mission only for the local player
success: Number - (Optional, default 1) if ending != "" 1 to end mission with success, 0 to fail mission
Return Value:
Nothing

Examples

Example 1:
[1, "WHITE", 5, 1] spawn BIS_fnc_fadeEffect;

Additional Information

See also:
endMission failMission BIS_fnc_endMission BIS_fnc_endMissionServer titleCut

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