inpLeftTriggerHit

Category: Input

Syntax:

inpLeftTriggerHit:Int(controller:Int)


Parameters

Returns

Int



Summary

Detects a single-frame press of the left trigger.

Takes controller (Int).

Returns 1 only on the frame when trigger transitions from released to pressed, then 0 until released and pressed again.

View detailed documentation online



Example
Include "BBR_INCLUDE.bam"

Local controller:Int = inpCreateController(0)
Local shotCount:Int = 0

Forever
    inpUpdateController(controller)

    If inpLeftTriggerHit(controller)
        shotCount = shotCount + 1
        Print "Shot fired! Total: " + shotCount
    End If

    If inpIsKeyHit(VK_ESCAPE) Then Exit
Forever

inpFreeController(controller)

BambooBasic © 2026 Michael Denathorn