#Local Multiplayer / Input management

1 messages · Page 1 of 1 (latest)

torn raft
#

eseentially what im trying to do is have my script look at the name of the character body (player 1, 2 ect) and determine which input device should control the script based off that character name, but im having some trouble getting a device number (controller 1,2,3,4 + keyboard) the func _input works fine except that it detects the keyboard/ mouse and controller 1 as event.device 0, plus idk how having all my inputs in a func would work. Any way i just cant find many docs on input managment in godot. I just want to know if im headed in the right direction or there are other solutions i should know about

ashen pumice
#

Yeah, the OS counts controller one as having the same ID as K&M, i do not think there is a work around for that.
You may have to filter inputs between K&M and Controller, THEN per ID.

You can filter by class of input (if event is InputEventJoypadButton) and if the input is of a different type or ID than allowed for this node, return the function early.