Community Forum

Example of registerActionEvent?

Forum Overview >> Scripting

Created15.12.2018 17:08

Daniel Dahlberg (Unknown) 15.12.2018 17:08

I'm trying to get InputBinding.registerActionEvent to work.
Does anyone have an working example of it?
At the moment I have an action added to the game but I'm trying to figure out how to fire a function when my assigned keys are pressed.

Kind Regards

Joachim Damm (jodamm) 16.12.2018 02:45
it depends for what you need the action event. Vehicles have the onRegisterActionEvents and the rideable specialization ia a good starting point :

If you need a key for the player like the flashlight then there is a table inputInformation.registrationList you can find here :

I have written an example mod to demonstrate some key bindings, but it was written before the documentation was released, so it is not the ideal way of doing it.

Note: Log in to post. Create a new account here.