EXP Bar Animating

Get help using Construct 2

Post » Sun Apr 21, 2013 1:52 pm

Hello i find out my self how to make a RPG style mod. But i can not find the way to animate EXP bar. So please help me. Thanks

Here is dropbox Demo CAPX: https://www.dropbox.com/s/aienp0z3wz749oi/RPG.capx
B
7
S
2
G
3
Posts: 28
Reputation: 2,273

Post » Sun Apr 21, 2013 2:08 pm

Here's an updated capx.

What I did was, instead of adding to the width of the XP bar directly, I stored the 20xp gained from killing enemies in a new variable called XPToAdd. Then I created a new event that, every tick and as long as XPToAdd was greater than zero, would add 1 to the width of the XP bar and subtract 1 from XPToAdd. The result is an animated XP bar.

PS: You should look at storing your XP in its own variable, instead of relying on the XP bar to track the total XP (this also allows you to scale up the XP required to gain a new level). The bar should be a representation of the XP, rather. You can set its width as a percentage of its total, like [(current XP / required XP for next level) * 200].
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Sun Apr 21, 2013 2:19 pm

Thank you for replay GeometriX. Im try to do like this:

System | XP = 1000. System | Set value 1 to Level.
System | XP = 2000. System | Set value 2 to Level.
System | XP = 3000. System | Set value 3 to Level.

This is only example. Or this way im doing is right? Or you have another method. If you have can you tell me pleas.
B
7
S
2
G
3
Posts: 28
Reputation: 2,273

Post » Sun Apr 21, 2013 2:29 pm

What i need is little demo capx with few level and xp example. You see on proper RPG mod you gain xp for example when you kill a monster you get 20EXP when you reach 7lvl your xp bar geting fill slowly because you need more exp for next level. I don't know how to explain this...

If you can. Can you edit my capx. And make proper RPG mod with animated bar and expierence. Thank you again.

Im not good with this bit...

PS: You should look at storing your XP in its own variable, instead of relying on the XP bar to track the total XP (this also allows you to scale up the XP required to gain a new level). The bar should be a representation of the XP, rather. You can set its width as a percentage of its total, like [(current XP / required XP for next level) * 200]. fragile2013-04-21 14:37:05
B
7
S
2
G
3
Posts: 28
Reputation: 2,273

Post » Sun Apr 21, 2013 2:55 pm

I won't do that, because it's your game and you should make it, but I've created a generic XP system that you can use. It's fully commented and doesn't use families, because I see you're still on the free version. I strongly recommend that you buy C2 to gain access to families, which will make the process of dishing out XP for monster kills much easier.

Here you go.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Sun Apr 21, 2013 3:04 pm

Briliant thank you very much for example. Im try to figure out it to my capx file.

Think is i like to purchase a full version but not now. I want to learn thinks to do then i will buy it thanks again.
B
7
S
2
G
3
Posts: 28
Reputation: 2,273

Post » Wed May 15, 2013 8:41 pm

May The Force Be With You Geometrix
B
32
S
4
Posts: 3
Reputation: 1,683


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jeffige, LeFuji, plinkie, Radulepy and 1 guest