Work With Triggers in Game
The following tutorial assumes you have already set up your game and made your first API calls. To learn how to do that, visit the Getting Started guide.
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.
Unity
string triggerName = "test";
LootLockerSDKManager.TriggeringAnEvent(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 event

Retrieving Previously Triggered Triggers

Unity
LootLockerSDKManager.ListingTriggeredTriggerEvents((response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved triggered events");
}
else
{
Debug.Log("Error retrieving triggered events");
}
});
Copy link
On this page
Trigger Event
Retrieving Previously Triggered Triggers