BIS fnc animateFlag: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\|MP *[Ee]ffects* *= * " to " ") |
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ :\\\-\/|()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
||
Line 34: | Line 34: | ||
[[private]] _eh = [<yourflag>, "FlagAnimationDone", { {{codecomment|/* your code */}} }] [[call]] [[BIS_fnc_addScriptedEventHandler]];</code> | [[private]] _eh = [<yourflag>, "FlagAnimationDone", { {{codecomment|/* your code */}} }] [[call]] [[BIS_fnc_addScriptedEventHandler]];</code> | ||
|[[flag]], [[flagOwner]], [[setFlagOwner]], [[setFlagSide]], [[setFlagTexture]], [[flagSide]], [[flagTexture]], [[setFlagAnimationPhase]], [[flagAnimationPhase]], [[Flag Textures]] | |seealso= [[flag]], [[flagOwner]], [[setFlagOwner]], [[setFlagSide]], [[setFlagTexture]], [[flagSide]], [[flagTexture]], [[setFlagAnimationPhase]], [[flagAnimationPhase]], [[Flag Textures]] | ||
}} | }} | ||
Revision as of 00:22, 17 February 2021
Description
- Description:
- Description needed
- Execution:
- call
- Multiplayer:
- The effect is global, MP compatible and its effect is persistent.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- 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, default false):
- Return Value:
- Return value needed
Examples
- Example 1:
[flag1, 0] call BIS_fnc_animateFlag;
- Example 2:
// Adding the "FlagAnimationDone" EH private _eh = [<yourflag>, "FlagAnimationDone", { /* your code */ }] call BIS_fnc_addScriptedEventHandler;
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
- Posted on December 12, 2016 - 20:02 (UTC)
- Killzone Kid
// Flag Demo (https://www.youtube.com/watch?v=sJtQfRML0cc) fnc_addFlagAction = { _this addAction [ "Pull The Cord", { player playAction "PutDown"; sleep 0.5; [_this select 0, flagAnimationPhase (_this select 0) + 0.2, 0.2] call BIS_fnc_animateFlag; _this select 0 removeAction (_this select 2); }, "", 10, true, true, "", "_this distance2D _target < 2" ]; }; private _flag = createVehicle ["Flag_BI_F", player getRelPos [10, 0], [], 0, "CAN_COLLIDE"]; [_flag, 0, true] call BIS_fnc_animateFlag; _flag call fnc_addFlagAction; [ _flag, "FlagAnimationDone", { if (_this select 1 > 0.9) exitWith { [_this select 0, "FlagAnimationDone"] call BIS_fnc_removeAllScriptedEventHandlers; removeAllActions (_this select 0); }; _this select 0 call fnc_addFlagAction; } ] call BIS_fnc_addScriptedEventHandler;