Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AchievementsHandler.c
Go to the documentation of this file.
1[EntityEditorProps(description: "Achievements activator on client-side")]
5
6class 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 //------------------------------------------------------------------------------------------------
22 {
23 Rpc(UnlockOnClient, achievement);
24 }
25
26 //------------------------------------------------------------------------------------------------
29 [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
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}
void IncrementAchievementProgress(AchievementStatId achievementStat)
void UnlockAchievement(AchievementId achievement)
void IncrementOnClient(AchievementStatId achievementStat)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
AchievementStatId
AchievementId
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition EnNetwork.c:95
RplRcver
Definition RplRcver.c:59
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition RplChannel.c:14