inpRightTriggerDown

Checks if the right trigger is pressed beyond the threshold. Takes controller (Int). Returns 1 if pressed beyond threshold (approximately 25-30%), or 0 if not.

Input

Parameters & Returns

Parameters

controller Int

Returns

Int

Quick Summary

Checks if the right trigger is pressed beyond the threshold. Takes controller (Int). Returns 1 if pressed beyond threshold (approximately 25-30%), or 0 if not.

Technical Exegesis...

Returns 1 if the right trigger is currently pressed beyond approximately 25-30% of its range, or 0 if not. This provides a digital (on/off) detection of the analog trigger, useful when you need simple trigger state without analog precision.

The function internally converts the analog trigger pressure into a boolean state using a threshold value. For analog pressure values, use inpGetRightTrigger() instead.

Example

Example.bam
Include "BBR_INCLUDE.bam"

Local controller:Int = inpCreateController(0)

Forever
    inpUpdateController(controller)

    If inpRightTriggerDown(controller)
        Print "Firing weapon!"
    End If

    If inpIsKeyHit(VK_ESCAPE) Then Exit
Forever

inpFreeController(controller)