Detects a single-frame press of the right trigger.
Takes controller (Int).
Returns 1 only on the frame when trigger transitions from released to pressed, then 0 until released and pressed again.
Input
Parameters & Returns
Parameters
controllerInt
Returns
Int
Quick Summary
Detects a single-frame press of the right trigger.
Takes controller (Int).
Returns 1 only on the frame when trigger transitions from released to pressed, then 0 until released and pressed again.
Technical Exegesis...
Returns 1 only on the single frame when the right trigger transitions from released to pressed (beyond the threshold), then returns 0 until the trigger is released and pressed again. This is useful for detecting trigger pulls as discrete actions rather than continuous holds.
Unlike inpRightTriggerDown() which returns 1 continuously while the trigger is held, this function only returns 1 once per press. The threshold is approximately 25-30% of the trigger's range.
Returns 1 only on the single frame when the right trigger transitions from released to pressed (beyond the threshold), then returns 0 until the trigger is released and pressed again. This is useful for detecting trigger pulls as discrete actions rather than continuous holds.
Unlike inpRightTriggerDown() which returns 1 continuously while the trigger is held, this function only returns 1 once per press. The threshold is approximately 25-30% of the trigger's range.
The controller must be created with inpCreateController() and updated with inpUpdateController() before checking trigger state. Only returns input when the active canvas or window has focus.
Example
Example.bam
Include "BBR_INCLUDE.bam"
Local controller:Int = inpCreateController(0)
Local jumpCount:Int = 0
Forever
inpUpdateController(controller)
If inpRightTriggerHit(controller)
jumpCount = jumpCount + 1
Print "Jump! Total jumps: " + jumpCount
End IfIf inpIsKeyHit(VK_ESCAPE) Then Exit
Forever
inpFreeController(controller)