disableUserInput

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Operation Flashpoint version 1.00
  Effects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Disable and enable the keyboard and mouse input, usually used during cutscenes.

Be careful with the usage of this command, always remember to enable the user input again, as once the user input is disabled, you can only shut down OFP but not exit the mission with escape.

Syntax

Syntax:
disableUserInput state
Parameters:
state: Boolean
Return Value:
Nothing

Examples

Example 1:
disableUserInput true
; cutscene

disableUserInput false

Additional Information

Multiplayer:
-
See also:
enableSimulationenableSimulationGlobal

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

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.

Bottom Section