System - Loop and Progress Bar as XP Bar

0 favourites
  • 5 posts
From the Asset Store
For Adventure, Action, Heroes, Sci-fi and Action-RPG games.
  • Sprite as Mouse Cursor (Solved). Under no circumstance, it seems, will it use the image as the mouse cursor. I figure this is probably something I'm doing or not doing.

    EDIT: This does work in Chrome, however. Did not work in FireFox.

    However, a new problem has emerged. I tried using the System - Loop function to repeat by adding 5 points to a progress bar each time something was killed. Having this in the event sheet causes the game and browser to crash, it seems.

    Also...

    Monster - On Destroyed - Add 5 to EXP (Progress Bar)

    Nothing happens. What is wrong with this line of coding, why does it not work?

  • Not sure why you are wanting to loop the event, just call the function (I assume that adds the +5) each time something is killed.

    As far as not showing on progress bar.. did you update the bar after adding the +5?

    If you are using a standard X pixel long rectangle then modifying it in increments to make it longer/shorter you will need to redraw it at its new length each time it changes.

    The easiest way to do this is to have an EXP variable that is updated each time something adds EXP and then set the length of the EXP BAR to EXP variable each time it needs updating (every time you change the value).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I don't know if it was technically a "Loop", but the idea behind it was so that for every enemy killed it repeats the +5 addition to the progress bar. I gave up on trying to use the Progress Bar as an EXP bar. But every other way is a lot more complicated it seems. I have since tried different methods however. Thanks for reply.

  • Try this tutorial on bars.. https://www.scirra.com/tutorials/182/making-a-fancy-lifebar

    You can also search the tutorials section for lots of tutorials on health/exp bars.

    You will also find many forum threads on this topic by searching for "health bar" in the "How do I" forum area.

  • you might want to look at doing your own custom progress bar. if you want something like a gradual bar with exp. this part is fairly easy just use one color bar and in the action just set the width or height to your desire place. If i remember right there a fairly easy code where you can use % to control the action of your progress bar using current data and max data point so that it flows evenly.

    the construct two progress bar is the worst and offer no flexiability. So id would just custom build your own.

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