You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A local co-op game which allows you to control each player, 3D isometric roguelite.
Describe the problem or limitation you are having in your project
Current solution requires either checking what input type is being pressed and adding a tag of it's ID by the device type. So that each input device has a unique ID.
Or as others have mentioned, making multiple input maps for each player which is troublesome and just annoying.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The feature in question would be to have a way of distinguishing between each input device by a unique ID.
This would help local co-op games.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
# Array containing the bound devices per player.varbound_devices: Array[int] = [ ]
### Check if the device is boundfunchas_device(id: int) ->bool:
fordevice: intinbound_devices:
ifdevice==id:
returntruereturnfalsefunc_unhandled_input(event: InputEvent) ->void:
# event.device should return a unique ID for that input deviceif!has_device(event.device): # Check if the device is not boundreturn# Ignore input if it isn't boundifevent.is_action_pressed("jump", event.device): # or can even check whether action is pressed on a per-device basis.print("Jump is pressed for device ", event.device)
If this enhancement will not be used often, can it be worked around with a few lines of script?
Current solution requires either checking what input type is being pressed and adding a tag of it's ID by the device type. So that each input device has a unique ID. Or by making multiple input maps for each player which is troublesome and just annoying.
Is there a reason why this should be core and not an add-on in the asset library?
This should be a core feature that improves the Engine as a whole and can lead to significantly easier making local co-op without having to waste time on making a whole system or duplicating input maps per player.
The text was updated successfully, but these errors were encountered:
Note that the suggested syntax would break compatibility, as we can't add an argument in the middle of the arguments
The input does track some device info internally, but it doesn't track time individually so it would have to be changed with more timing info for this to work, or you couldn't use is_action_just_pressed etc.
Generally the method for this would be to create individual actions with suffixes for each device, and then configure each player's code to reference the correct index, I would say that it might be more reasonable to make it easier to configure multi input systems with some form of automated tool in the input map instead
An alternative method would be to reconfigure the input map when players are linked to individual devices, that way you can use the classic "press any button to join as player 2" can be worked out by detecting the device and linking just all those actions, a bit more complicated but could be made easier with some helper code
Describe the project you are working on
A local co-op game which allows you to control each player, 3D isometric roguelite.
Describe the problem or limitation you are having in your project
Current solution requires either checking what input type is being pressed and adding a tag of it's ID by the device type. So that each input device has a unique ID.
Or as others have mentioned, making multiple input maps for each player which is troublesome and just annoying.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The feature in question would be to have a way of distinguishing between each input device by a unique ID.
This would help local co-op games.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Current solution requires either checking what input type is being pressed and adding a tag of it's ID by the device type. So that each input device has a unique ID. Or by making multiple input maps for each player which is troublesome and just annoying.
Is there a reason why this should be core and not an add-on in the asset library?
This should be a core feature that improves the Engine as a whole and can lead to significantly easier making local co-op without having to waste time on making a whole system or duplicating input maps per player.
The text was updated successfully, but these errors were encountered: