-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlxInput: Add Hold state/bool #3373
Comments
Just use this? if (FlxG.keys.pressed.SPACE && false == FlxG.keys.justPressed.SPACE) |
Hmm, I'll try making a check for this with the controls - if one of the keys returns this, then return false. |
the code I gave is a check to see if the space key was held, I imagine a check would use this to return
|
Yeah, that's my bad. |
Title. Why? Because Pressed and Just_Pressed return true at the same time it makes it impossible to only run or not run something if one of the keys of an action is already held down.
Modifying the behaviour of FlxInput to to make pressed only start returning after a frame might break some existing code, so add a new state called Hold that only returns true after the key's held for more than one frame?
I need this change in order to properly finish/fix this PR of mine:
FunkinCrew/Funkin#4145
The text was updated successfully, but these errors were encountered: