klabundee's Recent Forum Activity

  • i did what you showed there, everything works perfect. Only one tiny problem.

    When i click the gain exp button, its bar starts at half way,

    Look at the picture below

    As i said last post, you need to set the EXP bar sprite origin point to left.. by default it is in the middle of the sprite.

    Open the EXP sprite look on the left menu "Edit the image points", it will have origin point 0, right click on it -> Quick Assign -> Left

    After that it will change the position, you will have to set it again, here 44, 81 is working fine

  • Here.

    Don`t forget to chance player.Lvl to 1 and player.nextlevel to 500, also you need to change the EXP origin point to left instead of middle.

  • Just select your player sprite and change nextLevel to 500 and LvL to 1

  • the problem is at the "Set Width" :v

    ah well...i'll figure it out lol i just need to know how to set the exp bar width, i just thought the health bar would be same as exp bar

    The problem is your math.

    You are doing: Sprite Width * (Player.EXP/Player.nextLevel)

    Sprite Width: 70.441

    Player.EXP: 60

    Player.nextLevel: 0

    Do the math...

  • OK so first of all.. its because the Player.nextLevel is = 0.

  • After click the expBar width is = infinity on debug.. let me see why

  • Run it on debug mode, you can select the bar after click on gainExp and see where is it, if its outside the layout.. or if its a size problem like width=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok, so if possible share it too..

  • Is it the same project for the exp bar problem?

  • Upload the file to google drive, mega, dropbox or any other and share the link

  • Can you share the project file?

  • Isnt it easier to have like this:

    global variable: class

    On click WarriorIcon -> Set class to warrior

    Go to layout Loading

    On click MageIcon -> Set class to mage

    Go to layout Loading

    On click RangerIcon -> Set class to ranger

    Go to layout Loading

    On start of layout

    sub Event - Compare class = warrior -> Create object playerwarrior at XY

    sub Event - Compare class = mage -> Create object playermage at XY

    sub Event - Compare class = ranger -> Create object playerranger at XY

klabundee's avatar

klabundee

Early Adopter

Member since 26 Nov, 2015

Twitter
klabundee has 6 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies