Repository navigation
Scripting Input
Important
Input polling is currently only possible during an active game, i.e. when you can control the player and not when the menu/console/NETRICSA is open.
-
Buttonenum - Contains constants for everyKID_*value from the engine, e.g.Button.KID_Afor "A" letter key orButton.KID_ENTERfor Return/Enter key.Button.KID_NONEButton.KID_1Button.KID_2Button.KID_3Button.KID_4Button.KID_5Button.KID_6Button.KID_7Button.KID_8Button.KID_9Button.KID_0Button.KID_MINUSButton.KID_EQUALSButton.KID_QButton.KID_WButton.KID_EButton.KID_RButton.KID_TButton.KID_YButton.KID_UButton.KID_IButton.KID_OButton.KID_PButton.KID_LBRACKETButton.KID_RBRACKETButton.KID_BACKSLASHButton.KID_AButton.KID_SButton.KID_DButton.KID_FButton.KID_GButton.KID_HButton.KID_JButton.KID_KButton.KID_LButton.KID_SEMICOLONButton.KID_APOSTROPHEButton.KID_ZButton.KID_XButton.KID_CButton.KID_VButton.KID_BButton.KID_NButton.KID_MButton.KID_COMMAButton.KID_PERIODButton.KID_SLASHButton.KID_F1Button.KID_F2Button.KID_F3Button.KID_F4Button.KID_F5Button.KID_F6Button.KID_F7Button.KID_F8Button.KID_F9Button.KID_F10Button.KID_F11Button.KID_F12Button.KID_ESCAPEButton.KID_TILDEButton.KID_BACKSPACEButton.KID_TABButton.KID_CAPSLOCKButton.KID_ENTERButton.KID_SPACEButton.KID_LSHIFTButton.KID_RSHIFTButton.KID_LCONTROLButton.KID_RCONTROLButton.KID_LALTButton.KID_RALTButton.KID_ARROWUPButton.KID_ARROWDOWNButton.KID_ARROWLEFTButton.KID_ARROWRIGHTButton.KID_INSERTButton.KID_DELETEButton.KID_HOMEButton.KID_ENDButton.KID_PAGEUPButton.KID_PAGEDOWNButton.KID_PRINTSCRButton.KID_SCROLLLOCKButton.KID_PAUSEButton.KID_NUM0Button.KID_NUM1Button.KID_NUM2Button.KID_NUM3Button.KID_NUM4Button.KID_NUM5Button.KID_NUM6Button.KID_NUM7Button.KID_NUM8Button.KID_NUM9Button.KID_NUMDECIMALButton.KID_NUMLOCKButton.KID_NUMSLASHButton.KID_NUMMULTIPLYButton.KID_NUMMINUSButton.KID_NUMPLUSButton.KID_NUMENTERButton.KID_MOUSE1Button.KID_MOUSE2Button.KID_MOUSE3Button.KID_MOUSE4Button.KID_MOUSE5Button.KID_MOUSEWHEELUPButton.KID_MOUSEWHEELDOWNButton.KID_2MOUSE1Button.KID_2MOUSE2Button.KID_2MOUSE3
-
Axisenum - Contains indices and offsets of available input axes:-
Axis.None- The first/unused axis -
Axis.X1- Horizontal mouse axis -
Axis.Y1- Vertical mouse axis -
Axis.Z1- Scroll wheel axis -
Axis.X2- Horizontal axis of the second mouse -
Axis.Y2- Vertical axis of the second mouse -
Axis.Joysticks- Amount of available joysticks -
Axis.PerJoystick- Amount of axes per joystick for offsetting -
Axis.FirstJoystick- Index of the first axis of the first joystick for offsetting -
Axis.Count- Total amount of available axes
-
Returns amount of available axes. Equivalent to the engine's
CInput::GetAxisCount()function.
Return value: integer
Returns amount of available buttons. Equivalent to the engine's
CInput::GetButtonsCount()function.
Return value: integer
Returns internal name of the specified axis. Equivalent to the engine's
CInput::GetAxisName()function.
Arguments:
-
axis_index- Index of an axis from theAxisenum.
Return value: string
Returns localized name of the specified axis. Equivalent to the engine's
CInput::GetAxisTransName()function.
Arguments:
-
axis_index- Index of an axis from theAxisenum.
Return value: string
Returns current value of the specified axis. For joystick axes, this value is always in the
-1.0 .. +1.0range. Equivalent to the engine'sCInput::GetAxisValue()function.
Arguments:
-
axis_index- Index of an axis from theAxisenum.
Return value: float
Returns internal name of the specified button. Equivalent to the engine's
CInput::GetButtonName()function.
Arguments:
-
button_index- Index of a button from theButtonenum.
Return value: string
Returns localized name of the specified button. Equivalent to the engine's
CInput::GetButtonTransName()function.
Arguments:
-
button_index- Index of a button from theButtonenum.
Return value: string
Checks whether the specified button is currently held down. Equivalent to the engine's
CInput::GetButtonState()function.
Arguments:
-
button_index- Index of a button from theButtonenum.
Return value: bool
Returns axis index by its internal name, otherwise
Axis.None.
Arguments:
-
axis_index- Internal name of the axis (the kind returned byInput.GetAxisName()).
Return value: integer with the index of the associated axis.
Returns button index by its internal name, otherwise
Button.KID_NONE.
Arguments:
-
button_name- Internal name of the button (the kind returned byInput.GetButtonName()).
Return value: integer with the index of the associated button.
Designed and developed by Dreamy Cecil since 2022