Need help making an EXP meter

Get help using Construct 2

Post » Mon Jun 04, 2012 10:41 pm

I've been trying to reverse engineer the eventing for a HP bar I made (credit goes to Kiyoshi for the source eventing data), so I could make an EXP bar. However, the exp bar is not working as I suspected it would. It's supposed to be initially empty and fill up as the player gains EXP.

I've tried everything form switching the hotspot to the right side, making sure the step value doesn't return a 0 (as it divides width by the EXP until next level for the step value), reversing the TilNextEXP-CurrentEXP and even using "+" instead of "-" for the actual meter calculation.

Capx
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Tue Jun 05, 2012 5:19 am

Edit: I tinkered quite abit more with the exp meter I tried to make and almost got it...but I'm still having problems. One time, I had it perfect except for the bar always being full if exp was 0...then I had a power outage and had to restart and kind of forget how I did that. I'm completely stumped now, I suppose.

Updated capxLaDestitute2012-06-05 05:24:19
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Tue Jun 05, 2012 1:34 pm

Not checked the cap, but for the problem with 0, just add another condition that checks if exp is 0 or less and handle the case there. The original event should have a condition that checks if exp > 0.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Jun 05, 2012 5:03 pm

Thanks, I fixed it!
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Tue Jun 05, 2012 7:42 pm

Okay. I appear to be having a problem actually.

It appears it keeps doing the formula each time the player pauses, unpauses, and then pauses again. So, the exp bar keeps getting smaller each time the screen is updated via pausing.

Is there anyway to tell it to only update the display, unless the EXP value has changed?
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Thu Jun 07, 2012 6:15 pm

Can I get some help with this please?
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Thu Jun 07, 2012 6:24 pm

What is the problem, exactly? I can try to help, but I don't know what I'm looking at.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 07, 2012 6:28 pm

It functions normally when empty (and increases normally when exp is gained, even to scale! so five exp would show very little on the meter while 3/4 of the required amount would be very full) but when the player unpauses and pauses again to check the status menu, the width starts shrinking. I suspect that it keeps calculating the formula each time the pause menu is brought up (the meter's calculation formula has the following conditions: every tick, is pause menu on-scren, and two variable compares to make sure EXP...A. is not = to TilNextEXP, or B. not = to zero), and I'm not sure if there's a way to tell it to only run it once per layout UNLESS the exp value has changed.
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Thu Jun 07, 2012 7:15 pm

Okay, I think I understand, rearranged/deleted some events. Does this solve it?

ChaoLand_Edited.capx (r93)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 07, 2012 8:02 pm

Yeah, thank you!
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Next

Return to How do I....?

Who is online

Users browsing this forum: Lof, Yahoo [Bot], YoHoho and 22 guests