inpGetLeftTrigger

Returns the analog pressure value of the left trigger. Takes controller (Int). Returns floating-point number between 0.0 and 1.0.

Input

Parameters & Returns

Parameters

controller Int

Returns

Double

Quick Summary

Returns the analog pressure value of the left trigger. Takes controller (Int). Returns floating-point number between 0.0 and 1.0.

Technical Exegesis...

Returns the current analog pressure value of the left trigger (LT/L2) as a floating-point number between 0.0 and 1.0, where 0.0 means the trigger is fully released and 1.0 means it's fully pressed.

This function provides analog input for variable control based on trigger pressure. The controller must be created with inpCreateController() and updated with inpUpdateController() before reading trigger values.

Only returns input when the active canvas or window has focus. Returns 0.

Example

Example.bam
Include "BBR_INCLUDE.bam"

Local controller:Int = inpCreateController(0)

Forever
    inpUpdateController(controller)

    Local trigger:Double = inpGetLeftTrigger(controller)
    If trigger > 0.0
        Print "Left trigger pressure: " + trigger
    End If

    If inpIsKeyHit(VK_ESCAPE) Then Exit
Forever

inpFreeController(controller)