BIS fnc establishingShot: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: GUI(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "(Optional, default {{hl|[]}})" to "(Optional, default <sqf inline>[]</sqf>)")
 
(49 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= GUI


|gr1= GUI |GROUP1=
|arg= global


|arg= global |MParg= Arguments in MP
|eff= local


|eff= local |MPEffects=
|descr= Plays a fake UAV observational sequence which serves as an establishing shot.<br> [[File:BIS_fnc_establishingShot.gif|left|400px]]
____________________________________________________________________________________________


| Play a fake UAV observational sequence which serves as an establishing shot. [[File:BIS fnc establishingShot.gif|left|400px]] |DESCRIPTION=
|s1= [target, text, altitude, radius, angle, rotation, iconOptions, mode, fadeIn, waitTime] spawn [[BIS_fnc_establishingShot]]
____________________________________________________________________________________________


| [target, text, altitude, radius, angle, rotation, iconOptions, mode, fadeIn,waitTime] spawn [[BIS_fnc_establishingShot]] |SYNTAX=
|p1= target: [[Object]] or [[Array]] - target or target's position


|p1= target: [[Object]] or [[Array]] - Target or target's position |PARAMETER1=
|p2= text: [[String]] - (Optional, default "") text to display
|p2= text: [[String]] - Text to display |PARAMETER2=
|p3= altitude: [[Number]] - (optional) Altitude (in meters) |PARAMETER3=
|p4= radius: [[Number]] - (optional) Radius of the circular movement (in meters) |PARAMETER4=
|p5= angle: [[Number]] - Viewing angle (in degrees) |PARAMETER5=
|p6= rotation: [[Number]] - Direction of camera movement (0: anti-clockwise, 1: clockwise, default: random) |PARAMETER6=
|p7= iconOptions: [[Array]] - Each array in format:
*0: icon: [[String]] - Path to icon texture
*1: color: [[Array]] - Color in format [R,G,B,A]
*2: target: [[Object]], [[Position]] or [[Group]] - Where the texture should be drawn
*3: sizeX: [[Number]] - Size of icon in x (Optional, default 1)
*4: sizeY: [[Number]] Size of icon in y (Optional, default 1)
*5: angle: [[Number]] - Angle of icon (Optional, default [[random]] 360)
*6: text: [[String]] - Text displayed underneath the icon (Optional, default "")
*7: shadow: [[Number]] - 0 to draw now shadow, 1 to draw a shadow (Optional, default 0)
|PARAMETER7=
|p8= mode: [[Number]] - 0: normal (default), 1: world scenes |PARAMETER8=
|p9= fadeIn: [[Boolean]] - Fade in after completion (default: true) |PARAMETER9=
|p10= waitTime: [[Number]] - Wait time in seconds after the shot has been completed (Since Arma 3 1.81) |PARAMETER10=


| [[Boolean]] - true when done |RETURNVALUE=
|p3= altitude: [[Number]] - (Optional, default 500) altitude in meters
____________________________________________________________________________________________


|x1= <code><nowiki>[</nowiki>[[player]], "I can see my house from here", 500, 250, 75, 1, [], 0, [[true]]] [[spawn]] [[BIS_fnc_establishingShot]]</code> |EXAMPLE1=
|p4= radius: [[Number]] - (Optional, default 200) radius of the circular movement in meters


|x2= <code>[
|p5= angle: [[Number]] - (Optional, default random) viewing angle in degrees
  [5229.97,5233.07,0],
  "BLUFOR and OPFOR firefight",
  500,
  250,
  75,
  1,
  [
    ["\A3\ui_f\data\map\markers\nato\b_inf.paa",[0,0.3,0.6,1],group_1,1,1,0,"BLUFOR"],
    ["\A3\ui_f\data\map\markers\nato\o_inf.paa",[0.5,0,0,1],group_2,1,1,0,"OPFOR"]
  ],
  0,
  [[true]],
  15
] [[spawn]] [[BIS_fnc_establishingShot]];</code> |EXAMPLE2=


____________________________________________________________________________________________
|p6= rotation: [[Number]] - (Optional, default random) direction of camera movement
* 0: anti-clockwise
* 1: clockwise


|exec= spawn |Execution=
|p7= iconOptions: [[Array]] of [[Array]]s - (Optional, default <sqf inline>[]</sqf>) each array in format [icon, color, target, sizeX, sizeY, angle, text, shadow]:
____________________________________________________________________________________________
* icon: [[String]] - path to icon texture
* color: [[Array]] format [[Color|Color (RGBA)]]
* target: [[Object]], [[Position]] or [[Group]] - where the texture should be drawn
* sizeX: [[Number]] - (Optional, default 1) icon width
* sizeY: [[Number]] - (Optional, default 1) icon height
* angle: [[Number]] - (Optional, default [[random]] 360) icon angle
* text: [[String]] - (Optional, default "") text displayed underneath the icon
* shadow: [[Number]] - (Optional, default 0)
** 0 to draw a flat icon
** 1 to draw a shadowed icon


| [[BIS_fnc_dynamicText]], [[:Category:Function Group: GUI|GUI functions]] |SEEALSO=
|p8= mode: [[Number]] - (Optional, default 0)
}}
* 0: normal (disables saving and sets {{hl|BIS_missionStarted}} to [[nil]])
* 1: world scenes


<h3 style="display:none">Notes</h3>
|p9= fadeIn: [[Boolean]] - (Optional, default [[true]]) fade in after completion
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|p10= waitTime: [[Number]] - (Optional, default 2) wait time in seconds after the shot has been completed
</dl>
|p10since= arma3 1.82


<h3 style="display:none">Bottom Section</h3>
|r1= [[Boolean]] - true when done


[[Category:Functions|{{uc:establishingShot}}]]
|x1= <sqf>[player, "I can see my house from here", 500, 250, 75, 1, [], 0, true] spawn BIS_fnc_establishingShot;</sqf>
[[Category:{{Name|arma3}}: Functions|{{uc:establishingShot}}]]


<!-- CONTINUE Notes -->
|x2= <sqf>
[
[5229.97, 5233.07, 0],
"BLUFOR and OPFOR firefight",
500,
250,
75,
1,
[
["\A3\ui_f\data\map\markers\nato\b_inf.paa", [0, 0.3, 0.6, 1], group_1, 1, 1, 0, "BLUFOR"],
["\A3\ui_f\data\map\markers\nato\o_inf.paa", [0.5, 0, 0, 1], group_2, 1, 1, 0, "OPFOR"]
],
0,
true,
15
] spawn BIS_fnc_establishingShot;
</sqf>


<!-- DISCONTINUE Notes -->
|exec= spawn


<!-- CONTINUE Notes -->
|seealso= [[BIS_fnc_dynamicText]] [[Arma 3: Mission Presentation]]
<dl class="command_description">
}}
<dd class="notedate">Posted on January 28, 2018 - 02:01 (UTC)</dd>
 
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt>
{{Note
<dd class="note">
|user= Lou Montana
Be aware that [[spawn]]ing this function will set [[enableSaving]] to true. Quick workaround:
|timestamp= 20180128020100
<code>_savingEnabled = [[savingEnabled]];
|text= Be aware that [[spawn]]ing this function will set [[enableSaving]] to true. Quick workaround:
_handle = [player, "myText"] [[spawn]] [[BIS_fnc_establishingShot]];
<sqf>
[[waitUntil]] { [[scriptDone]] _handle };
private _savingEnabled = savingEnabled;
[[enableSaving]] [_savingEnabled, false];</code>
_handle = [player, "myText"] spawn BIS_fnc_establishingShot;
waitUntil { scriptDone _handle };
enableSaving [_savingEnabled, false];
</sqf>


Or, if you can't wait the end of the establishing shot:
Or, if you can't wait the end of the establishing shot:
<code>_savingEnabled = [[savingEnabled]];
<sqf>private _savingEnabled = savingEnabled;
_handle = [player, "myText"] [[spawn]] [[BIS_fnc_establishingShot]];
_handle = [player, "myText"] spawn BIS_fnc_establishingShot;
_handle [[spawn]] { [[waitUntil]] { [[scriptDone]] _this }; [[enableSaving]] [_savingEnabled, false]; };</code>
_handle spawn { waitUntil { scriptDone _this }; enableSaving [_savingEnabled, false]; };</sqf>
</dd>
}}


<dd class="notedate">Posted on July 30, 2019 - 12:01 (UTC)</dd>
{{Note
<dt class="note">[[User:R3vo|R3vo]]</dt>
|user= R3vo
<dd class="note">
|timestamp= 20190730120100
In order to change the camera to TI or NVG mode execute the following right after [[BIS_fnc_establishingShot]] was spawned.
|text= In order to change the camera to TI or NVG mode execute the following right after [[BIS_fnc_establishingShot]] was spawned.
<code>[[true]] [[setCamUseTI]] 1;</code>
<sqf>true setCamUseTI 1;</sqf>
The effect will automatically be terminated once the establishing shot ended.
The effect will automatically be terminated once the establishing shot ended.
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 18:09, 8 November 2023

Hover & click on the images for description

Description

Description:
Plays a fake UAV observational sequence which serves as an establishing shot.
BIS fnc establishingShot.gif
Execution:
spawn
Groups:
GUI

Syntax

Syntax:
[target, text, altitude, radius, angle, rotation, iconOptions, mode, fadeIn, waitTime] spawn BIS_fnc_establishingShot
Parameters:
target: Object or Array - target or target's position
text: String - (Optional, default "") text to display
altitude: Number - (Optional, default 500) altitude in meters
radius: Number - (Optional, default 200) radius of the circular movement in meters
angle: Number - (Optional, default random) viewing angle in degrees
rotation: Number - (Optional, default random) direction of camera movement
  • 0: anti-clockwise
  • 1: clockwise
iconOptions: Array of Arrays - (Optional, default []) each array in format [icon, color, target, sizeX, sizeY, angle, text, shadow]:
  • icon: String - path to icon texture
  • color: Array format Color (RGBA)
  • target: Object, Position or Group - where the texture should be drawn
  • sizeX: Number - (Optional, default 1) icon width
  • sizeY: Number - (Optional, default 1) icon height
  • angle: Number - (Optional, default random 360) icon angle
  • text: String - (Optional, default "") text displayed underneath the icon
  • shadow: Number - (Optional, default 0)
    • 0 to draw a flat icon
    • 1 to draw a shadowed icon
mode: Number - (Optional, default 0)
  • 0: normal (disables saving and sets BIS_missionStarted to nil)
  • 1: world scenes
fadeIn: Boolean - (Optional, default true) fade in after completion
since Arma 3 logo black.png1.82
waitTime: Number - (Optional, default 2) wait time in seconds after the shot has been completed
Return Value:
Boolean - true when done

Examples

Example 1:
[player, "I can see my house from here", 500, 250, 75, 1, [], 0, true] spawn BIS_fnc_establishingShot;
Example 2:
[ [5229.97, 5233.07, 0], "BLUFOR and OPFOR firefight", 500, 250, 75, 1, [ ["\A3\ui_f\data\map\markers\nato\b_inf.paa", [0, 0.3, 0.6, 1], group_1, 1, 1, 0, "BLUFOR"], ["\A3\ui_f\data\map\markers\nato\o_inf.paa", [0.5, 0, 0, 1], group_2, 1, 1, 0, "OPFOR"] ], 0, true, 15 ] spawn BIS_fnc_establishingShot;

Additional Information

See also:
BIS_fnc_dynamicText Arma 3: Mission Presentation

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
Lou Montana - c
Posted on Jan 28, 2018 - 02:01 (UTC)
Be aware that spawning this function will set enableSaving to true. Quick workaround:
private _savingEnabled = savingEnabled; _handle = [player, "myText"] spawn BIS_fnc_establishingShot; waitUntil { scriptDone _handle }; enableSaving [_savingEnabled, false];
Or, if you can't wait the end of the establishing shot:
private _savingEnabled = savingEnabled; _handle = [player, "myText"] spawn BIS_fnc_establishingShot; _handle spawn { waitUntil { scriptDone _this }; enableSaving [_savingEnabled, false]; };
R3vo - c
Posted on Jul 30, 2019 - 12:01 (UTC)
In order to change the camera to TI or NVG mode execute the following right after BIS_fnc_establishingShot was spawned. The effect will automatically be terminated once the establishing shot ended.