Getgamefuncbind: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Add documentation
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


Retrieves the bind for the specified ''<gamefuncID>'' as a string and stores it in quote ''<quoteID>''.
Retrieves the bind for the specified ''<gamefuncID>'' as a string and stores it in quote ''<quoteID>''.
This command will always return the first of the two possible keybinds shown in the control options menu, unless the first is undefined.


Note:
Note:
Line 7: Line 9:
* If the gamefunc is bound to a mouse, joystick or gamepad input, the string will be enclosed in round brackets: <code>"(%s)"</code>
* If the gamefunc is bound to a mouse, joystick or gamepad input, the string will be enclosed in round brackets: <code>"(%s)"</code>
* If the gamefunc is not bound to any key, the resulting string will be <code> "UNBOUND"</code>
* If the gamefunc is not bound to any key, the resulting string will be <code> "UNBOUND"</code>
See also: [[getkeyname]]


==Gamefunc Reference==
==Gamefunc Reference==

Latest revision as of 03:20, 12 January 2021

getgamefuncbind <quoteID> <gamefuncID>

Retrieves the bind for the specified <gamefuncID> as a string and stores it in quote <quoteID>.

This command will always return the first of the two possible keybinds shown in the control options menu, unless the first is undefined.

Note:

  • If the gamefunc is bound to a keyboard input, the string will be enclosed in square brackets: "[%s]"
  • If the gamefunc is bound to a mouse, joystick or gamepad input, the string will be enclosed in round brackets: "(%s)"
  • If the gamefunc is not bound to any key, the resulting string will be "UNBOUND"

See also: getkeyname

Gamefunc Reference

The following values are used with definegamefuncname, getgamefuncbind, getkeyname and undefinegamefunc.

Exposed Value Label Description
No 0 gamefunc_Move_Forward
No 1 gamefunc_Move_Backward
No 2 gamefunc_Turn_Left
No 3 gamefunc_Turn_Right
No 4 gamefunc_Strafe
No 5 gamefunc_Fire
No 6 gamefunc_Open
No 7 gamefunc_Run
No 8 gamefunc_Alt_Fire Does nothing without defining EVENT_ALTFIRE.
No 9 gamefunc_Jump
No 10 gamefunc_Crouch
No 11 gamefunc_Look_Up
No 12 gamefunc_Look_Down
No 13 gamefunc_Look_Left
No 14 gamefunc_Look_Right
No 15 gamefunc_Strafe_Left
No 16 gamefunc_Strafe_Right
No 17 gamefunc_Aim_Up
No 18 gamefunc_Aim_Down
No 19 gamefunc_Weapon_1
No 20 gamefunc_Weapon_2
No 21 gamefunc_Weapon_3
No 22 gamefunc_Weapon_4
No 23 gamefunc_Weapon_5
No 24 gamefunc_Weapon_6
No 25 gamefunc_Weapon_7
No 26 gamefunc_Weapon_8
No 27 gamefunc_Weapon_9
No 28 gamefunc_Weapon_10
No 29 gamefunc_Inventory
No 30 gamefunc_Inventory_Left
No 31 gamefunc_Inventory_Right
No 32 gamefunc_Holo_Duke
No 33 gamefunc_Jetpack
No 34 gamefunc_NightVision
No 35 gamefunc_MedKit
No 36 gamefunc_TurnAround
No 37 gamefunc_SendMessage
No 38 gamefunc_Map
No 39 gamefunc_Shrink_Screen
No 40 gamefunc_Enlarge_Screen
No 41 gamefunc_Center_View
No 42 gamefunc_Holster_Weapon
No 43 gamefunc_Show_Opponents_Weapon
No 44 gamefunc_Map_Follow_Mode
No 45 gamefunc_See_Coop_View
No 46 gamefunc_Mouse_Aiming
No 47 gamefunc_Toggle_Crosshair
No 48 gamefunc_Steroids
No 49 gamefunc_Quick_Kick
No 50 gamefunc_Next_Weapon
No 51 gamefunc_Previous_Weapon
No 52 gamefunc_Show_Console
No 53 gamefunc_Show_DukeMatch_Scores
No 54 gamefunc_Dpad_Select
No 55 gamefunc_Dpad_Aiming
No 56 gamefunc_AutoRun
No 57 gamefunc_Last_Weapon
No 58 gamefunc_Quick_Save
No 59 gamefunc_Quick_Load
No 60 gamefunc_Alt_Weapon Switch between Pipebomb & Detonator, Shrinker & Expander
No 61 gamefunc_Third_Person_View
No 62 gamefunc_Toggle_Crouch
Defines
define gamefunc_Move_Forward            0
define gamefunc_Move_Backward           1
define gamefunc_Turn_Left               2
define gamefunc_Turn_Right              3
define gamefunc_Strafe                  4
define gamefunc_Fire                    5
define gamefunc_Open                    6
define gamefunc_Run                     7
define gamefunc_Alt_Fire                8
define gamefunc_Jump                    9
define gamefunc_Crouch                  10
define gamefunc_Look_Up                 11
define gamefunc_Look_Down               12
define gamefunc_Look_Left               13
define gamefunc_Look_Right              14
define gamefunc_Strafe_Left             15
define gamefunc_Strafe_Right            16
define gamefunc_Aim_Up                  17
define gamefunc_Aim_Down                18
define gamefunc_Weapon_1                19
define gamefunc_Weapon_2                20
define gamefunc_Weapon_3                21
define gamefunc_Weapon_4                22
define gamefunc_Weapon_5                23
define gamefunc_Weapon_6                24
define gamefunc_Weapon_7                25
define gamefunc_Weapon_8                26
define gamefunc_Weapon_9                27
define gamefunc_Weapon_10               28
define gamefunc_Inventory               29
define gamefunc_Inventory_Left          30
define gamefunc_Inventory_Right         31
define gamefunc_Holo_Duke               32
define gamefunc_Jetpack                 33
define gamefunc_NightVision             34
define gamefunc_MedKit                  35
define gamefunc_TurnAround              36
define gamefunc_SendMessage             37
define gamefunc_Map                     38
define gamefunc_Shrink_Screen           39
define gamefunc_Enlarge_Screen          40
define gamefunc_Center_View             41
define gamefunc_Holster_Weapon          42
define gamefunc_Show_Opponents_Weapon   43
define gamefunc_Map_Follow_Mode         44
define gamefunc_See_Coop_View           45
define gamefunc_Mouse_Aiming            46
define gamefunc_Toggle_Crosshair        47
define gamefunc_Steroids                48
define gamefunc_Quick_Kick              49
define gamefunc_Next_Weapon             50
define gamefunc_Previous_Weapon         51
define gamefunc_Show_Console            52
define gamefunc_Show_DukeMatch_Scores   53
define gamefunc_Dpad_Select             54
define gamefunc_Dpad_Aiming             55
define gamefunc_AutoRun                 56
define gamefunc_Last_Weapon             57
define gamefunc_Quick_Save              58
define gamefunc_Quick_Load              59
define gamefunc_Alt_Weapon              60 
define gamefunc_Third_Person_View       61 
define gamefunc_Toggle_Crouch           62