Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AchievementsHandler.c
Go to the documentation of this file.
1 [EntityEditorProps(description: "Achievements activator on client-side")]
2 class SCR_AchievementsHandlerClass : ScriptComponentClass
3 {
4 }
5 
6 class SCR_AchievementsHandler : ScriptComponent
7 {
8  //------------------------------------------------------------------------------------------------
11  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
12  void UnlockOnClient(AchievementId achievement)
13  {
14  Print("Unlocking achievement with ID " + achievement, LogLevel.DEBUG);
15  Achievements.UnlockAchievement(achievement);
16  }
17 
18  //------------------------------------------------------------------------------------------------
21  void UnlockAchievement(AchievementId achievement)
22  {
23  Rpc(UnlockOnClient, achievement);
24  }
25 
26  //------------------------------------------------------------------------------------------------
29  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
30  void IncrementOnClient(AchievementStatId achievementStat)
31  {
32  Print("Incrementing achievement stat with ID " + achievementStat, LogLevel.DEBUG);
33  Achievements.IncrementAchievementProgress(achievementStat, 1);
34  }
35 
36  //------------------------------------------------------------------------------------------------
40  {
41  Rpc(IncrementOnClient, achievementStat);
42  }
43 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
AchievementId
AchievementId
Definition: AchievementId.c:12
AchievementStatId
AchievementStatId
Definition: AchievementStatId.c:12
IncrementAchievementProgress
void IncrementAchievementProgress(AchievementStatId achievementStat)
Definition: SCR_AchievementsHandler.c:39
IncrementOnClient
void IncrementOnClient(AchievementStatId achievementStat)
Definition: SCR_AchievementsHandler.c:30
UnlockAchievement
void UnlockAchievement(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:21
SCR_AchievementsHandlerClass
Definition: SCR_AchievementsHandler.c:2
Achievements
Definition: Achievements.c:17