Game Development Reference
In-Depth Information
Tracking the player's level
This will track the player's level in the game. A player can increase their level in any
way you wish within the game:
void Level(int Amount)
{
if(getLvl)
{
if(Amount >= 5 && Amount < 9)
{
if(achLvl != 1)
achLvl++;
}
if(Amount >= 10 && Amount < 24)
{
if(achLvl != 2)
achLvl++;
}
if(Amount >= 25 && Amount < 49)
{
if(achLvl != 3)
achLvl++;
}
if(Amount >= 50 && Amount < 74)
{
if(achLvl != 4)
achLvl++;
}
if(Amount >= 75 && Amount < 99)
{
if(achLvl != 5)
achLvl++;
}
if(Amount >= 100)
{
if(achLvl != 6)
Search WWH ::




Custom Search