BIS fnc animateFlag: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
(Created page with " {{Function|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.67|= Game version ____________...")
Line 3: Line 3:
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| arma3dev |= Game name


|1.00|= Game version
|1.67|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| ''N/A'' |= Description
| Smoothly animates given flag from current position on the flag pole to the given position. The function is global, MP and JIP compatible, persistent and will syncronise flags across the network. When flag animation is done, the scripted event handler "FlagAnimationDone" is called. To add scripted event handler to the flag use: <br><br><tt>_eh <nowiki>=</nowiki> [<yourflag>, "FlagAnimationDone", <yourcode>] call [[BIS_fnc_addScriptedEventHandler]];</tt><br><br>
'''NOTE''': Never put call to this function into object init field |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_animateFlag]]; --> |= Syntax
| [flag, phase, instant] call [[BIS_fnc_animateFlag]] |= Syntax
|p1= |= Parameter 1


| |= Return value
|p1= flag: [[Object]] - [[flag]] object of the type "FlagCarrier" |= Parameter 1
|p2= phase: [[Number]] - desired animation phase 0...1 (0 - bottom of the flag pole, 1 - top of the flag pole) |= Parameter 2
|p3= instant (Optional):
* [[Boolean]] - when [[true]], animation is instant ("FlagAnimationDone" EH is not called in this case). Default: [[false]]
* [[Number]] - animation duration multiplier |= Parameter 3
 
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[flag1, 0] [[call]] [[BIS_fnc_animateFlag]];</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
|[[flag]], [[flagOwner]], [[setFlagOwner]], [[setFlagSide]], [[setFlagTexture]], [[flagSide]], [[flagTexture]], [[setFlagAnimationPhase]], [[flagAnimationPhase]], [[Flag Textures]] |= See also


}}
}}
Line 32: Line 38:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:animateFlag}}]]
[[Category:Function Group: Network|{{uc:netId}}]]
[[Category:Functions|{{uc:animateFlag}}]]
[[Category:Functions|{{uc:netId}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:animateFlag}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:netId}}]]

Revision as of 22:02, 12 December 2016


-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.67|1.67]]
Hover & click on the images for description

Description

Description:
Smoothly animates given flag from current position on the flag pole to the given position. The function is global, MP and JIP compatible, persistent and will syncronise flags across the network. When flag animation is done, the scripted event handler "FlagAnimationDone" is called. To add scripted event handler to the flag use:

_eh = [<yourflag>, "FlagAnimationDone", <yourcode>] call BIS_fnc_addScriptedEventHandler;

NOTE: Never put call to this function into object init field
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[flag, phase, instant] call BIS_fnc_animateFlag
Parameters:
flag: Object - flag object of the type "FlagCarrier"
phase: Number - desired animation phase 0...1 (0 - bottom of the flag pole, 1 - top of the flag pole)
instant (Optional):
  • Boolean - when true, animation is instant ("FlagAnimationDone" EH is not called in this case). Default: false
  • Number - animation duration multiplier
Return Value:
Nothing

Examples

Example 1:
[flag1, 0] call BIS_fnc_animateFlag;

Additional Information

See also:
flagflagOwnersetFlagOwnersetFlagSidesetFlagTextureflagSideflagTexturesetFlagAnimationPhaseflagAnimationPhaseFlag Textures

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

[[Category:Introduced with arma3dev version 1.67]][[ Category: arma3dev: New Functions | BIS FNC ANIMATEFLAG]][[ Category: arma3dev: Functions | BIS FNC ANIMATEFLAG]]

Notes

Bottom Section