Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

leveling system c++

void LevelUp()
{
  static const int required_experience[] =
  {
    0, 45, 95, 145, 210, 285, 380, 495, 610, 745, 99999999
  };
  //so whenever myexp reaches on of these integers, mylvl will go up by 1

  while(myexp >= required_experience[mylvl])
    ++mylvl;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #leveling #system
ADD COMMENT
Topic
Name
5+5 =