disableUserInput: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:Scripting Commands OFP 1.[4-9]{2}(\|(\{\{uc:\{\{PAGENAME\}\}\}\}|#|[A-Z]+))?\]\] " to "") |
Lou Montana (talk | contribs) m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "") |
||
Line 26: | Line 26: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<dd class="notedate">Posted on 14 March 2014</dd> | <dd class="notedate">Posted on 14 March 2014</dd> | ||
<dt class="note>'''[[User:Killzone_Kid|Killzone_Kid]]''' | <dt class="note>'''[[User:Killzone_Kid|Killzone_Kid]]''' | ||
Line 39: | Line 38: | ||
<br><br> | <br><br> | ||
UPDATE: There is now [[userInputDisabled]] command, which allows one to check if user input is still disabled after enabling it, so that one can retry until enabling is successful. | UPDATE: There is now [[userInputDisabled]] command, which allows one to check if user input is still disabled after enabling it, so that one can retry until enabling is successful. | ||
</dl> | </dl> | ||
Revision as of 00:34, 6 April 2021
Description
- Description:
- Description needed
- Groups:
- Interaction
Syntax
- Syntax:
- Syntax needed
- Parameters:
- state: Boolean - true to disable, false to enable
- Return Value:
- Return value needed
Examples
- Example 1:
disableUserInput true; // cutscene disableUserInput false;
Additional Information
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 14 March 2014
- Killzone_Kid
-
Sometimes, when disableUserInput true command is invoked while the user is holding a button, when disableUserInput false is called and the user is no longer holding the button, the input will resume as if the user is still holding the button. To reset this behaviour, disable and enable user input again in the same frame:
disableUserInput true; //do something disableUserInput false; disableUserInput true; disableUserInput false;
Unfortunately, if the user is moving mouse when disableUserInput true command is invoked, the mouse input will get stuck for the whole duration of disabled user input but will reset as soon as disableUserInput false is called. I was unable to find workaround for this one.
UPDATE: There is now userInputDisabled command, which allows one to check if user input is still disabled after enabling it, so that one can retry until enabling is successful.