Need help making an EXP meter

0 favourites
  • 10 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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.


  • 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 capx

  • 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.

  • Thanks, I fixed it!

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can I get some help with this please?

  • What is the problem, exactly? I can try to help, but I don't know what I'm looking at. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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.

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

    ChaoLand_Edited.capx (r93)

  • Yeah, thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)