- Describe your reason for requesting this feature. What problems are you running into?
I want to add a mechanic where the player holds the A button and an action occurs when they release it. I understand that Pulp doesn't expose input pressed/released events, but I can work around that using the existing functionality and event.frame
to count time. Unfortunately, config.inputRepeat
only enabled input repeating on udlr as seen in the runtime here:
if ( LuaTrue( acceptsInput ) ) {
if ( LuaTrue( justRepeated(Button.UP) ) ) {
playerMove(0,-1)
} else if ( LuaTrue( justRepeated(Button.DOWN) ) ) {
playerMove(0,1)
} else if ( LuaTrue( justRepeated(Button.LEFT) ) ) {
playerMove(-1,0)
} else if ( LuaTrue( justRepeated(Button.RIGHT) ) ) {
playerMove(1,0)
}
if ( LuaTrue( justPressed(Button.A) ) ) {
buttonPressed('confirm')
}
if ( LuaTrue( justPressed(Button.B) ) ) {
buttonPressed('cancel')
}
if ( LuaTrue( crankAngle.relative!==0 ) ) {
cranked()
}
}
I understand repeating A/B button presses could lead to confusing behavior (like interacting with a sprite multiple times, or skipping through dialog) so maybe it could be behind a separate flag like config.inputButtonRepeat
?
- How would this request improve your experience with using Pulp?
I would be able to build the mechanic I want.
- Include any other details you have relating to this request.
N/A