kroftek's Recent Forum Activity

  • I can't say I understand everything 100% :/

    I've never worked with ratio...also, my values are not meant to be that round...my XP bar is 292 in width, and the MAXXP values are 100, 250, 500, etc. so a different amount is added between levels

    maybe a small capx would help? you've said that it could be done in one event...hope I'm not bothering you

  • OK, really simple: you have the XP amount, and the MAXXP amount, the bar follows the progress, when XP > MAXXP, player levels up, and the bar is reset. But somehow it doesn't work for me...the XP bar tutorial on Scirra's site doesn't cover the situation when you level up, it just has the same amount of XP and MAXXP, it doesn't add up anything in the process. In my example, normally the XP amount stays, for example at 100, and the MAXXP amount then changes to 200, that means that the bar is stuck halfway of the goal. So I tried this: adding a new variable, which gathers the XP in the same way and is set 0 when player levels up, and then works its way up to MAXXP, etc etc...but the bar does not work properly, as it reaches MAXXP it's usually stuck somewhere in the middle...meaning I'm most probably doing something wrong....I've also tried experimenting with the bar sprite width, but nothing good has come out of it...so what I need is the proper behavior of the XP bar, that it grows gradually and follows the XP and MAXXP amounts correctly. Thanks in forward!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If i accidentally encounter some inconsistencies, issues or bugs with the second option I'm using, I will definitely take a look at these and try to incorporate one of them. So thanks for clearing things up a bit

  • I might have forgot to point out the somewhat obvious fact, which is that at some point in the game, the MAXHP value will be increased (otherwise I wouldn't even include the MAXHP value meaning the maximum would always be 100, I was just taking that value as an example).

    So I guess the first option is out of the question. The second however is logical and works great for now.

    I didn't really get the third one, I tried it, but it didn't work, it just went way over MAXHP...

    Well as usual, it would be great if the number of events used is small enough to be effective. I'm grouping all these events separately so yeah, it should be pretty easy to spot it's position in the event sheet anytime

  • OK, the situation is as follows:

    1. There is a character with 2 stats, or in this case instance variables, pHP (player's health) and pMAXHP (player's maximum health), logically the player's health can not be larger than his maximum health at any given time.

    2. There is also a health potion, which restores 20 health to the character, if his HP amount is less than MAXHP.

    3. At some point the character's HP will be in a range of 81-100, leaving the question how to derive the needed number, for instance, the HP is 86, meaning that the potion sholud restore 14 HP. I was testing a few equasions, but none has seemed to work properly. So this is my way of saying 'yeah, I suck at math' and hoping that someone will end my misery.

    Thanks in forward!

  • anyone?

  • OK, so I've been wandering is it possible to make an app in which you would simply input the names/teams, then generate the fixtures using those names, and inputing a score for both names/teams then adds to their points and other stats, which would be shown on the table... I'm currently working on a project already, and it has a lot of my current occupation, but I've tried to make at least something (and it was not so good, to be honest), and seeing that I'm stuck thinking how would I handle the variables and generating the fixtures, I thought it would take more time than needed, so I'm hoping somebody here might just get me started, giving me the basics, so I could further upgrade the app. Here's the basic rundown; (epic paint skills ahead)

    the names would be entered in the text boxes (1), could be also done on a separate screen/layout, doesn't matter, then using those names to generate the fixtures (2) between those names. Then, for example, team A beats team B with 2:1 - results go in (3), and from that each team gets some stats, for example, team A gets 3 points for winning, team B adds 2 goals to their GA (goals against) stat, etc. All of that would also be displayed on the table (4). I was also interested how do I rank/sort these teams based on highest amount of points.

    There it is, I hope it's not too difficult (I think is not, I might just be that dumb ), so anyone with some spare time could just give me a push in the right direction (an example with 4 teams would be enough). Thanks in forward!

kroftek's avatar

kroftek

Member since 4 Dec, 2013

None one is following kroftek yet!

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies