Input's GameProcessedEvent is acting strange

This might all be me really misunderstanding GameProcessedEvent’s use BUT…

GameProcessedEvent is vague enough to begin with. I use it in my script to make sure it doesn’t fire when the player is chatting, and it’s working really well when playing on PCs, but when I play with a controller (since I’m hoping to get this greenlit for Xbox) it’s acting up. It’s separating inputs, where some buttons are firing GameProcessedEvent = false, others arent.

ButtonA is true, ButtonL2 is false. ButtonR2 is true in my game, but false in my repro, ButtonR1 is false in my game but true in my repro, and I’m not even using ButtonR2 or ButtonR1 in the code of either of them.

So yeah. Lecture me as to what I’m doing wrong, or if it’s actually not my fault.

2 Likes

I have the exact same issue. I don’t think you’re doing anything wrong. I would assume the proper behavior would be for us to ignore any control inputs with GameProcessed ‘true’; however, as you pointed out, there are some weird cases where it is ‘true’ but shouldn’t be with game controllers.

It makes binding controls to gamepads a bit more difficult, since we currently have to ignore the ‘processed’ flag.

1 Like

GameProcessedEvent tells you if roblox processed the event before it told you about it. A is the jump button, R2 is the click button, and R1/L1 are the tool switch buttons. You can tell roblox to stop processing the A button by unbinding the control from ContextActionService (you can find the control in the StarterCharacterScripts). You can stop roblox from processing R1/L1 by disabling the backpack.

2 Likes

Alright, that’s what I was fearing was the reason why it didn’t work. I wonder why R2 works sometimes, while other times it doesn’t though
EDIT: Snipe-fixed lmao

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.