inpRightTriggerHit

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

controller Int

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.

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 If

    If inpIsKeyHit(VK_ESCAPE) Then Exit
Forever

inpFreeController(controller)