How to make an XP Meter
Kleptomatikk
Member Posts: 4
I searched for one here but in the thread, I couldn't really understand what they said. So if anyone can explain a little bit more clearly, i'd be thankful
Comments
http://www.deepblueapps.com/xpmeter/
Darren.
Make an actor that is 10 pixels by 10 pixels (square). Add a replicate behavior and set the direction to 0 or whatever direction (0, 90, 180, or 270) you want the bar to grow. Set the copies to your XP attribute*. Set the spacing to self.size.width.
*If you are counting XP by ones, when you get to 1000 XP, you'll have an actor 10,000 pixels long. Not good. So you'll need to think of a mathematical formula to take a fraction of the total XP. As an example, you might set the copies field to game.XP/1000 so that when the player has 1000 XP, the replicate actor is 10 pixels (10*(1000/1000)) long and when the player has 5000 XP, the replicate actor is 50 (10*(5000/1000)) pixels long, etc. It all depends on how large your XP values are going to get.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User