GetAltControl
Revision as of 09:49, 12 June 2008 by imported>Haama (→Notes: Fixed script to use 65535 io -1)
A command for Oblivion Script Extender
Syntax:
GetAltControl id
Retrieves the mouse button bound to the requested control.
Examples
set mouseAttackButton to GetAltControl 4 set mouseBlockButton to GetAltControl 7
Notes
- This function returns a number which is (255 + MouseButtonID*256). The left mouse button has an ID of 0, the right an ID of 1, the middle 2 and so on up to a maximum of 7.
- If there is no button bound to the requested control, or if the requested control is not valid, this function will return 65535.
- If you want to know which keyboard key, if any, is bound to a control, use GetControl.
- To convert the value returned by GetAltControl to a DX scancode usable with IsKeyPressed2, do something like this:
short button set button to getAltControl 4 ; attack button if ( button != 65535 ) set button to ( button - 255 ) / 256 + 256 endif
Control IDs
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