BIS fnc holdKey: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Add more description) |
Lou Montana (talk | contribs) m (Fix) |
||
Line 6: | Line 6: | ||
|gr1= Interaction | |gr1= Interaction | ||
|descr= Function that executes code when a key has been held down for a long enough time - "Hold X to Advance" text is displayed when any key is pressed. | |descr= Function that executes code when a key has been held down for a long enough time - "Hold X to Advance" text is displayed when any key is pressed.<br> | ||
All other keys | All other keys (but {{Controls|Esc}}) are deactivated until the conditions are met - only mouse controls work (character rotation and fire). | ||
|exec= spawn | |exec= spawn |
Revision as of 00:18, 21 May 2023
Description
- Description:
- Function that executes code when a key has been held down for a long enough time - "Hold X to Advance" text is displayed when any key is pressed.
All other keys (but Esc) are deactivated until the conditions are met - only mouse controls work (character rotation and fire). - Execution:
- spawn
- Groups:
- Interaction
Syntax
- Syntax:
- [display, key, time, code, control] call BIS_fnc_holdKey
- Parameters:
- display: Display - (Optional, default findDisplay 12 for map display) display the event is attached to. By default it is the map display
- key: Number - (Optional, default 57 for Space) what key to press - see DIK KeyCodes
- time: Number - (Optional, default 3) how long the key has to be held down in seconds
- code: Code - (Optional, default {}) scheduled code to be executed when key is held down for long enough
- 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" }] spawn 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