LootLocker
Guides
How-to
Background
Reference
Search…
Welcome
Getting Started
Introduction
Register a LootLocker Account
Create a Game on LootLocker
Unity Tutorials
Unreal Tutorials
Other Engine Tutorials
Use the Sample Game & Mobile App
Configure Your LootLocker Account
How-to
Introduction
Authentication
Players
LootLocker Basics
Assets
Leaderboards
Collectables
Progression
Triggers
Create a Trigger
Work With Triggers in Game
DLCs
Messages
Player Segments
User Generated Content (UGC)
Heroes
Other Use Cases
Background
Introduction
What is LootLocker?
Management Console
Asset Manager & Assets
Player Manager
Game Systems
Backend Services
Live Ops Tools
Game Settings
Profile Settings
Reference
Introduction
SDKs
Game API
Admin API
Server API
Mobile App
Changelogs
Unity SDK
Unreal SDK
Admin API
Game API
Server API
Mobile App
Powered By
GitBook
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
1
string
triggerName
=
"test"
;
2
LootLockerSDKManager
.
TriggeringAnEvent
(
triggerName
,
(
response
)
=>
3
{
4
if
(
response
.
success
)
5
{
6
Debug
.
Log
(
"Successfully triggered event"
);
7
}
8
else
9
{
10
Debug
.
Log
(
"Error triggering event"
);
11
}
12
});
Copied!
To learn more about the endpoint you can check out our reference documentation on
triggering an event
​
Retrieving Previously Triggered Triggers
Unity
1
LootLockerSDKManager
.
ListingTriggeredTriggerEvents
((
response
)
=>
2
{
3
if
(
response
.
success
)
4
{
5
Debug
.
Log
(
"Successfully retrieved triggered events"
);
6
}
7
else
8
{
9
Debug
.
Log
(
"Error retrieving triggered events"
);
10
}
11
});
Copied!
Previous
Create a Trigger
Next - How-to
DLCs
Last modified
7mo ago
Copy link
Contents
Trigger Event
Retrieving Previously Triggered Triggers