Handles loading and unlocking of medals.
Categories > Newgrounds.io > rex_ngio_medalIntroductionLinksDependenceUsagePrepareManage medalsGet listUnlock
Put rex_ngio_authentication into project, and set property App id
and AES key
.
Mange medals in dashboard, API Tools
, Medals
.
Action:Get list
Callback
Success : Condition:On get medals list error
Expression:MedalsAsJSON
Expression:MedalsCount
Condition:For each medal
Expression:CurMedalName
Expression:CurMedalID
Expression:CurMedalIcon
Expression:CurMedalDifficulty
Expression:CurMedalDescription
Expression:CurMedalValue
Expression:CurMedalIsSecret
, returns 1
if this medal is secret
Expression:CurMedalIsUnlocked
, returns 1
if this medal is unlocked
Condition:Is secret
Condition:Is unlocked
Condition:Compare difficulty
Expression:LoopIndex
, index in this for each loop
Get medal by index
Expression:Index2MedalName( index )
Expression:Index2MedalID( index )
Expression:Index2MedalIcon( index )
Expression:Index2MedalDifficulty( index )
Expression:Index2MedalDescription( index )
Expression:Index2MedalValue( index )
Expression:Index2MedalIsSecret( index )
, returns 1
if this medal is secret
Expression:Index2MedalIsUnlocked( index )
, returns 1
if this medal is unlocked
Condition:Is secret
Condition:Is unlocked
Condition:Compare difficulty
Error : Condition:On get medals list error
Expression:ErrorMessage
Action:Unlock
Callback
Success : Condition:On unlock medal
Expression:LastUnlockedMedalID
Error : Condition:On unlock medal error
Expression:ErrorMessage