BIS fnc holdKey: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 18: | Line 18: | ||
|p4= code: [[Code]] - code to be executed when key is held down for long enough. [[canSuspend]] returns [[true]] inside the code | |p4= code: [[Code]] - code to be executed when key is held down for long enough. [[canSuspend]] returns [[true]] inside the code | ||
|p5= control: [[Control]] - (Optional, default [[controlNull]] | |p5= control: [[Control]] - (Optional, default [[controlNull]]) text control to be used in place of the default "Press X to skip" control. | ||
|r1= [[Nothing]] | |r1= [[Nothing]] |
Revision as of 00:47, 30 April 2023
Description
- Description:
- Function that executes a user-defined code when a key has been held down for a long enough time.
- Execution:
- call
- Groups:
- Interaction
Syntax
- Syntax:
- [display, key, time, code, control] call BIS_fnc_holdKey
- Parameters:
- display: Display - display the event is attached to. By default it is the map display
- key: Number - what key to press. See DIK KeyCodes
- time: Number - how long the key has to be held down in seconds
- code: Code - code to be executed when key is held down for long enough. canSuspend returns true inside the code
- control: Control - (Optional, default controlNull) text control to be used in place of the default "Press X to skip" control.
- Return Value:
- Nothing
Examples
- Example 1:
- [findDisplay 46, 36, 5, { hint "Key 'J' pressed for 5 seconds" }] call BIS_fnc_holdKey; // action is added to the mission display
Additional Information
- See also:
- BIS_fnc_holdActionAdd addAction
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