BIS fnc mapAnimAdd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (infobox to template)
(Added desc, examples, parameters, returns, see also)
Line 5: Line 5:
|1.00|Game version=
|1.00|Game version=


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


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


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


Description:
|[duration, toZoom, toPosition, interpModeZoom, interpModePosition, fromZoom, fromPosition] call [[BIS_fnc_mapAnimAdd]]|Syntax=
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|Parameter 1=
_this select 0: FLOAT - The animation duration in seconds
|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)|Parameter 2=
_this select 1: FLOAT - The zoom value
|p3= toPosition: [[Position]] - (Optional, default [0, 0, 0]) the position vector|Parameter 3=
_this select 2: ARRAY - The position vector
|p4= interpModeZoom: [[Number]] - (Optional, default 12) the interpolation mode for the zoom|Parameter 4=
_this select 3: INTEGER - The interpolation mode for the zoom
|p5= interpModePosition: [[Number]] - (Optional, default 12) the interpolation mode for the position|Parameter 5=
_this select 4: INTEGER - The interpolation mode for the position
|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)|Parameter 6=
_this select 5: FLOAT - The zoom value to start animation from, if not set the current map zoom is used
|p7= fromPosition: [[Position]] - (Optional, default current map position) the position vector to start the animation from|Parameter 7=
_this select 6: ARRAY - The position vector to start animation from, if not set the current map position is used


Returns:
|[[Nothing]]|Return value=
Nothing


Examples:
|x1= <code>[[openMap]] [[true]]; {{codecomment|// The function won't work if the map is not open}}
[2.0, 0.05, getPos player] call BIS_fnc_mapAnimAdd;
[2.0, 0.05, [[getPos]] [[player]]] [[call]] BIS_fnc_mapAnimAdd;</code>|Example 1=
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=
 
|[] call [[BIS_fnc_mapAnimAdd]]|Syntax=
 
|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
 
|Datatype - description|Return value=
 
|x1= <code></code>|Example 1=


|exec= call |Execution=
|exec= call |Execution=


| |See also=
| [[BIS_fnc_mapAnimClear]], [[BIS_fnc_mapAnimDone]], [[mapAnimAdd]], [[mapAnimClear]], [[mapAnimCommit]], [[mapAnimDone]], [[ctrlMapAnimAdd]], [[ctrlMapAnimClear]], [[ctrlMapAnimCommit]], [[ctrlMapAnimDone]]|See also=
}}
}}



Revision as of 13:50, 22 April 2020

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:
Uncategorised

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: Position - (Optional, default current map position) the position vector to start the animation from
Return Value:
Nothing

Examples

Example 1:
openMap true; // The function won't work if the map is not open [2.0, 0.05, getPos player] call BIS_fnc_mapAnimAdd;

Additional Information

See also:
BIS_fnc_mapAnimClearBIS_fnc_mapAnimDonemapAnimAddmapAnimClearmapAnimCommitmapAnimDonectrlMapAnimAddctrlMapAnimClearctrlMapAnimCommitctrlMapAnimDone

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