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
I'm using gamesalad at school so I can't download it. That's why I need instructions
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited November 2013
Here's a way to do it:
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.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
I'm curious why you can ask for help on the forums but not download a file. Are you blocked from downloading or is your teacher just not allowing you?
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
Okay well hopefully my instructions are enough to get you started. If not and you have access to YouTube all you need to do is Google health bar gamesalad.
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.