Class "Input"
Last updated
Was this helpful?
Last updated
Was this helpful?
{: .abp .tooltip .badge }
Returns the current strength in which a button was pressed. This is 0 OR 1 with a keyboard. With a controller, this can be used to get the strength in which you have moved the analog stick in a direction.
???- example "Example Code" This code prints the current "strength" in which the analog stick was moved to the left.
{: .abp .tooltip .badge }
Use "GetActionValue" instead of this function.
{: .abp .tooltip .badge }
Returns the current mouse position in game coordinates (true) or render coordinates.
???- example "Example Code" This code renders "Hello World!" at the current mouse position.
Returns, if an action-button is pressed or not. An Action-button is any button that got a default function assigned to it. This function will return true, as long the button is held down.
???- example "Example Code" This code prints "bomb Button pressed", when any button was pressed that is assigned to the "place bomb" function.
Returns, if an action-button was pressed some time before or not. An Action-button is any button that got a default function assigned to it. This functions will only return true, if the button was pressed down. It will no longer return true, after you called this function and try to call it in the next update cycle (for example in the next render cycle).
???- example "Example Code" This code prints "bomb Button pressed", when any button was pressed that is assigned to the "place bomb" function.
Returns, if a button is pressed or not. This function will return true, as long the button is held down.
???- example "Example Code" This code prints "Enter Button pressed", when the "Enter"-Button was pressed.
Returns, if a button was pressed some time before or not. This functions will only return true, if the button was pressed down. It will no longer return true, after you called this function and try to call it in the next update cycle (for example in the next render cycle).
???- example "Example Code" This code prints "Enter Button was pressed", when the "Enter"-Button was pressed.
Returns, if a mousebutton is pressed or not. Left: 0, Right: 1, mousewheel: 2, back button: 3, forward button: 4
???- example "Example Code" This code prints "Right Click", when the "right"-mousebutton was pressed.
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }
{: .abp .tooltip .badge }