DisableControl


A command for Oblivion Script Extender

Syntax:

(nothing) DisableControl whichControl:short

Disables both the key and mouse buton assigned to the specified control.

Example

DisableControl 5

This disabled the Activation keyboard and mouse keys, if there are any.

NotesEdit

  • The keys disabled by DisableControl will continue to work in the Inventory and Container Menus, but not the Controls Menu (not sure about other menus).
  • This does not seem to be the case with the "Attack" control (LMB). With control 4 disabled I found that left mouse clicks don't work on the inventory, save or saved games menus, either to select or scroll. In fact when my character died with control 4 disabled I couldn't close the game. I'm now re-enabling the control in a MenuMode block.
  • When the player switches controls, the new control will need to be disabled. Also, the original key will need to be enabled. Here's an example script to keep the correct Activate key(s) disabled:
DisableControl 5
...
begin MenuMode 1021 ;Controls Menu
  if (TurnOffKeys == 0)
    set TurnOffKeys to 1
    EnableControl 5
  endif
end

begin MenuMode 1015 ;Options Menu
  if TurnOffKeys
    set TurnOffKeys to 0
    RefreshControlMap
    DisableControl 5
  endif
end

Control IDsEdit

Forward 0
Back 1
Slide Left 2
Slide Right 3
Attack 4
Activate 5
Block 6
Cast 7
Ready Weapon 8
Crouch/Sneak 9
Run 10
Always Run 11
Auto Move 12
Jump 13
Toggle POV 14
Menu Mode 15
Rest 16
Quick Menu 17
Quick1 18
Quick2 19
Quick3 20
Quick4 21
Quick5 22
Quick6 23
Quick7 24
Quick8 25
QuickSave 26
QuickLoad 27
Grab 28

See AlsoEdit