Difference between revisions of "GetAltControl"
Jump to navigation
Jump to search
imported>Haama (→See Also: Added links) |
imported>Entim (duplicated link) |
||
Line 60: | Line 60: | ||
*[[DisableControl]] | *[[DisableControl]] | ||
*[[EnableControl]] | *[[EnableControl]] | ||
*[[GetControl]] | *[[GetControl]] | ||
*[[IsControlPressed]] | *[[IsControlPressed]] |
Revision as of 16:47, 25 November 2007
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. (-1, if read as a short)
- 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 != -1 ) 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