Activate a trigger

circle-info

You are viewing legacy triggers. We've launched a new trigger system, it's much more powerful and flexible! Check it out!

Work With Triggers in Game

circle-exclamation

After settings up some triggers in the console we can implement it in the game.

Trigger Event

Calling this in the game will award the player with any score/XP or assets we set up while create the trigger.

string triggerName = "test";
LootLockerSDKManager.ExecuteTrigger(triggerName, (response) =>
{
    if (response.success)
    {
        Debug.Log("Successfully triggered event");
    }
    else
    {
        Debug.Log("Error triggering event");
    }
});

To learn more about the endpoint you can check out our reference documentation on triggering an eventarrow-up-right

Retrieving Previously Triggered Triggers

Last updated

Was this helpful?