Is it possible in TGF or MMF to have two counter,
one (we call this counter A) set to 100 and the other one (we call this one B) set to X.
Is there someway to make counter A to show the percentage of counter B's maximum value (how many percent is left)?
This would be useful in games where the player has a health bar that increases in value but not in size.
In other words, you should have 3 counters.
- Counter A (hidden) the actual value. Can represent health, ammo, experience or whatever.
- Counter B (hidden) the max value. This can be used for max values. Maybe in an RPG game, it would be useful to have the max value always be 25 * PlayerLevel, so the % thing would always work no matter what.
- Counter C (bar, or numbers) The counter seen by the player. If numbers added to the "actual" counter are small and not added all at once, this counter will look smooth when points are gained. So you could have a seperate hidden counter that held the points a player got, and each time a player got points, the points would be added to this counter instead of the score counter.
Then a condition could be set:
- if Counter("PointsHolder") greater than 0, add 1 to score and subtract 1 from "PointsHolder"