Game Development Reference
In-Depth Information
ine whether the player can continue to unlock more achievement levels of a specific
achievement.
Resetting the achievements
The first function that we will add to our achievement system will allow us to reset
our achievements to a base value. Add this next function to the script:
void ResetAchievements()
{
achKills = 0;
achTotGold = 0;
achGoldSpnt = 0;
achLvl = 0;
achRndsW = 0;
achTime = 0;
getKills = true;
getTotGold = true;
getGoldSpnt = true;
getLvl = true;
getRndsW = true;
getTime = true;
}
Within the preceding function, we set all of our achievement level variables to 0 and
the bool variables to true .
Search WWH ::




Custom Search