[Studio Beta] New Input Action System

Would there be future expandability to allow multi keybinds? Meaning like having the ability to
(Press Shift + B) together for 1 binding

And do we have a rough estimate on when we are able to see IAS out of Studio Beta and allowed to be used in games?

Yes, modifier keys as another property on InputBindings connected to bool action types is a feature we’re looking into.

Sorry, I don’t have an estimate on timeline to share

1 Like

I see, thats great you guys are looking into it. So far I am really loving this, the objects in explorer are very easy to use and set up!

1 Like

This works wonders but it would be nice if it had a “ResetOnRespawn” property like ScreenGuis do.

I would also love to see an up-to-date mobile button creator which works with this system.

I made an example workaround for PlayerScripts but still:

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local PlayerGui = Player:WaitForChild("PlayerGui")

local pressedEvent, releasedEvent

local function CharacterAdded(character: Model)
	local playContext = PlayerGui:WaitForChild("PlayContext", 1)
	local reloadAction = playContext:WaitForChild("WeaponReload", 1)
	
	if pressedEvent then
		pressedEvent:Disconnect()
	end
	if releasedEvent then
		releasedEvent:Disconnect()
	end
	
	pressedEvent = reloadAction.Pressed:Connect(function()
		print('RELOADING Pressed')
	end)
	releasedEvent = reloadAction.Released:Connect(function()
		print('RELOADING Released')
	end)
end

Player.CharacterAdded:Connect(CharacterAdded)
if Player.Character then
	CharacterAdded(Player.Character)
end

To the team that made this, you deserve a pat on your back. This is very well done.

1 Like

I honestly think all of these mentioned things are useful. I think the ability to translate one type of input to another, you will find, opens up a large amount of possibilities for very specific control requirements.
(Like aforementioned triggering a Bool with a thumbstick, or treating a set of UI buttons as a Direction2D)

In my case, I’m using movement that does not actually require the granularity of the thumbstick for the most part, so having D-Pad like controls that I can hook the thumbstick into would work fine.

But I definitely also see instances where I might want to fake a thumbstick with UI buttons too, which is best done the opposite, with UI buttons that can act like stick direction.

Hence, really, anything that can be translated to another input type should be, since different devices have different needs. (VR, amiright?)

The idea of a dynamic thumbstick being creatable is 100% also a good idea - But I consider it a separate idea, not necessarily one that replaces the need for inputs to work between action types.

2 Likes

hey guys, im not too sure but is there a way to set multiple keyboard bindings? i might ve missed it in the post

YES, WE NEED THIS NOW. Didn’t even think of that

1 Like

Hey, Aykeri!
Does this include the ability to have case-sensitivity? I.e being able to solely listen to lower or upper case? One use case being parsing keyboard input as Midi Keystrokes.
Thanks.
Aiden

1 Like

-- this is an incredibly selfish thought process

4 Likes

Um, I don’t think this takes away from any sort of coding.

From first impressions, it seems like it has a lot of potential of making it easier to organize and handle input code aswell as expand to different platforms. This doesn’t have anything to do with AI though, and I don’t really get what you mean.

You shouldn’t be worried about the whole instance approach considering these instances could possibly take out like… what… if statements of input.KeyCode == Enum.KeyCode...? What is your concern, what would be taken out? You still need to actually code things… this doesn’t “do things” for you, but it could let you do your things more easily.

1 Like

Does anyone have any estimate when this will be available to live roblox, i made a whole system with this, not knowing it isn’t able to be used in live roblox (I KNOW, MY FAULT, should have read the whole documentation. Anyway yea, anyone have any ideas when it would be released?

2 Likes

same here lol… i actually think it wont take TOO long cause of the state it is rn, it will prolly be released as a beta on this month, or at least i hope so

I really like this system, however there is an issue I noticed as InputBinding does not have an option for MouseMovement or MouseDelta, so it is not possible to bind the mouse in those bindings. While this is not normally an issue, it means developers have to manually add support for something like Mouse Steering and other analog controls with the mouse as opposed to it being a feature that is possible automagically via InputBinding.

It also does not support modifier key lists, so you cannot bind an action in a way where holding Alt and moving the mouse can allow you to control something else, like the movement of the crane on a vehicle, or you need to press certain keys to activate items on the first spell bar in an MMO, and Shift+Key or Ctrl+Key for the second and third spell bars. You would have to handle modifiers separately.

What I would really like is for the system to accept essentially any kind of input anywhere, and where applicable, you can modify the value so it fits, such as mapping only +Y or +X on a joystick to an input, and -X or -Y to another (independent up, down, left, and right mappings), and for mouse settings to have the option to be relative to where the input began, relative to absolute coordinates, deltas, or also to lock or unlock the mouse. Essentially, every bind would behave as a Vector2 bind, and you can keep boolean states, Pressed/Released, and whatnot regardless of the setting. You would just use whatever properties you needed for the particular input. It would also be necessary to add options to re-bind joystick inputs, i.e. if you wanted to swap X and Y axis. I would also appreciate a way to calibrate joystick inputs through InputBinding, for example, calibrating/setting a lower and upper deadzone, and the ‘upward’ direction. That way all joystick input bindings can be automatically adjusted without developer intervention.

Another issue is that there is no way to configure the behavior of stacking binds. For example, if a player presses both the primary and secondary bindings for an input, letting go of either button will set the state back to 0.0, which may be suboptimal in cases where you want the state change to occur only when all binds are not pressed, or if you want a specific behavior like Snap Strafing where pressing A or D while the opposite key is held down would force the latest input state as opposed to stalling at 0.0.

This, and hopefully a Input Bindings screen in the Roblox Menu would help tremendously, hopefully created based on hierarchy, so you could have this InputContext structure and get an appropriately structured Bindings interface:

Player Input
|_ Movement
|___ Walk
|___ ...
|_ Camera
|___ Camera Angle
|___ ...
1 Like

Really interesting. And what a coincidence i’ve been working on the similar package that inspired by godot one. There’s a couple of extra features i’d suggest to add

  1. custom emitting of actions (e.g. from the ui)
  2. 1 point of receiving of all actions (subscription if the any action was emitted)
  3. Ability to check if the actions are pressed at run-time (smth like IsJustPressed, IsJustReleased, IsPressed, IsReleased) without additional tracking of the previous and the next frame
  4. Instead of changing the type to bool / number / Vector2 directly add methods to get each (GetIsActived(), GetIsJustActivated(), GetIsDeactivated(), GetIsJustDeactivated(), GetValue(), GetValue2D())
  5. Adding threshold property (e.g if the value is above 0.5 - count it as pressed / active)

(smth like GetIsJustActivated() checks whether it wasnt active in the previous frame - could be prob useful for frame-to-frame input)

Imo it will give a lot of flexibility for the developers to setup their input system

here is my package if you want to take a look
Input actions

It has all specified above, but some of them are not properly documented yet.

4 Likes

Acting like better input handling is going to put scripters out of a job is crazy :joy:

4 Likes

Firstly, I hate the fact that I can’t bind buttons like space to other things, since I guess it messes with the player controller, although you can easily change the jump button from space in the PlayerController. Secondly, I just spent like 2 hours updating all my code and removing UIS just for IAS to not work at all in the actual game. I get it’s a beta feature, but why say

if I can’t use it in game? If there’s a fix or I’m just doing something wrong someone please let me know, but the game in studio works perfectly fine.

Nevermind:

I’m just horrible at reading, but it would’ve been nice to make it more emphasized that it cant be put into live games man :weary:

I think anything that can be done intuitively definitely should be — and it should be opened up as much as possible to new and inexperienced developers so they can still make great things — but I think it should definitely have a coded version and alternative for those who would like more direct access and control. A more dynamic ContextActionService with button binding and input sources/directions/controls (e.g. data to check if something else already messed with the input or if it was into a GuiObject or something) would be awesome.