BIS fnc mapAnimAdd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Function|= Comments | arma3 |Game name= |1.00|Game version= <!---|arg= local |Multiplayer Arguments=---> <!---|eff= local |Multiplayer Effects=---> | <pre>/* Author:...")
 
m (Some wiki formatting)
 
(13 intermediate revisions by 4 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= Map and Markers


<!---|arg= local |Multiplayer Arguments=--->
|arg= local


<!---|eff= local |Multiplayer Effects=--->
|eff= local


| <pre>/*
|descr= Similar to [[mapAnimAdd]], yet it provides additional parameters to allow for a non-linear zoom and various position interpolation modes.
Author:
Nelson Duarte


Description:
|s1= [duration, toZoom, toPosition, interpModeZoom, interpModePosition, fromZoom, fromPosition] call [[BIS_fnc_mapAnimAdd]]
Same as mapAnimAdd but with possibility for non linear zoom and position interpolation modes


Parameters:
|p1= duration: [[Number]] - (Optional, default 1.0) the animation duration in seconds
_this select 0: FLOAT - The animation duration in seconds
_this select 1: FLOAT - The zoom value
_this select 2: ARRAY - The position vector
_this select 3: INTEGER - The interpolation mode for the zoom
_this select 4: INTEGER - The interpolation mode for the position
_this select 5: FLOAT - The zoom value to start animation from, if not set the current map zoom is used
_this select 6: ARRAY - The position vector to start animation from, if not set the current map position is used


Returns:
|p2= toZoom: [[Number]] - (Optional, default 0.05) the zoom at the end of the animation, ranging from 0.01 (max. zoom) to 1 (zoomed out)
Nothing


Examples:
|p3= toPosition: [[Position]] - (Optional, default [0, 0, 0]) the position vector
[2.0, 0.05, getPos player] call BIS_fnc_mapAnimAdd;
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=


|[] call [[BIS_fnc_mapAnimAdd]]|Syntax=
|p4= interpModeZoom: [[Number]] - (Optional, default 12) the interpolation mode for the zoom


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|p5= interpModePosition: [[Number]] - (Optional, default 12) the interpolation mode for the position


|Datatype - description|Return value=
|p6= fromZoom: [[Number]] - (Optional, default current map zoom) the zoom at the begnning of the animation, ranging from 0.01 (max. zoom) to 1 (zoomed out)


|x1= <code></code>|Example 1=
|p7= fromPosition: [[Array]] format [[Position]] - (Optional, default current map position) the position vector from which to start the animation


|exec= call |Execution=
|r1= [[Nothing]]


| |See also=
|x1= <sqf>
openMap true; // the function will not work if the map is not open
[2.0, 0.05, getPosASL player] call BIS_fnc_mapAnimAdd;
</sqf>
 
|seealso= [[BIS_fnc_mapAnimClear]] [[BIS_fnc_mapAnimDone]] [[mapAnimAdd]] [[mapAnimClear]] [[mapAnimCommit]] [[mapAnimDone]] [[ctrlMapAnimAdd]] [[ctrlMapAnimClear]] [[ctrlMapAnimCommit]] [[ctrlMapAnimDone]]
}}
}}
[[Category:Function Group: MapAnimation|{{uc:mapAnimAdd}}]]
[[Category:Functions|{{uc:mapAnimAdd}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:mapAnimAdd}}]]

Latest revision as of 11:31, 1 July 2022

Hover & click on the images for description

Description

Description:
Similar to mapAnimAdd, yet it provides additional parameters to allow for a non-linear zoom and various position interpolation modes.
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
[duration, toZoom, toPosition, interpModeZoom, interpModePosition, fromZoom, fromPosition] call BIS_fnc_mapAnimAdd
Parameters:
duration: Number - (Optional, default 1.0) the animation duration in seconds
toZoom: Number - (Optional, default 0.05) the zoom at the end of the animation, ranging from 0.01 (max. zoom) to 1 (zoomed out)
toPosition: Position - (Optional, default [0, 0, 0]) the position vector
interpModeZoom: Number - (Optional, default 12) the interpolation mode for the zoom
interpModePosition: Number - (Optional, default 12) the interpolation mode for the position
fromZoom: Number - (Optional, default current map zoom) the zoom at the begnning of the animation, ranging from 0.01 (max. zoom) to 1 (zoomed out)
fromPosition: Array format Position - (Optional, default current map position) the position vector from which to start the animation
Return Value:
Nothing

Examples

Example 1:
openMap true; // the function will not work if the map is not open [2.0, 0.05, getPosASL player] call BIS_fnc_mapAnimAdd;

Additional Information

See also:
BIS_fnc_mapAnimClear BIS_fnc_mapAnimDone mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone

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