The expBar symbol, located in the expBar layer of Scene 1 of HUDKit.fla, is the exp bar at the bottom of the screen which tracks the player’s progress through his/her current rank. expBar contains the exp MovieClip which is the yellow bar that grows as the player gains experience through kills and captures.
The rank symbol, located in the rank layer of Scene 1 of HUDKit.fla, shows the player’s current rank. rank contains 18 Keyframes, each dedicated to one rank. Each Keyframe displays the icon and title associated with the rank.
Figure 10: expBar and rank Symbols
void FxHUDView::UpdatePlayerEXP(FxHUDEnvironment *penv) { FxHUDPlayer* pplayer = penv->GetHUDPlayer(); if (pplayer->GetLevelXP() != State.Exp) { Value::DisplayInfo info; // Update the rank icon. Each rank icon is on a different frame of the rank movieClip. RankMC.GotoAndStop(UInt(pplayer->GetRank() + 1)); info.SetScale(pplayer->GetLevelXP() * 100, 100); // Scale the EXP bar movieClip. ExpBarMC.SetDisplayInfo(info); } }
Similar to the team score bars, exp is scaled based on the player’s current experience when the player’s experience changes. To update rank, GFx::Value::GotoAndStop() is used to Keyframe X, where X is the player’s current rank + 1 (since there is no Frame 0).