Game Development Reference
In-Depth Information
if(Amount >= 250 && Amount < 499)
{
if(achKills != 4)
achKills++;
}
if(Amount >= 500 && Amount < 999)
{
if(achKills != 5)
achKills++;
}
if(Amount >= 1000)
{
if(achKills != 6)
achKills = 6;
}
if(achKills == 6)
getKills = false;
}
}
Tracking the gold total
The next tracker will track how much gold the player gained in the entire time they
played the game. Add this function to the script:
void TotalGold(int Amount)
{
if(getTotGold)
{
if(Amount >= 100 && Amount < 249)
{
if(achTotGold != 1)
achTotGold++;
}
if(Amount >= 250 && Amount < 499)
{
if(achTotGold != 2)
Search WWH ::




Custom Search