How do I make a gradual exp system?

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • Hi friends... I have a question... How can I make a gradual EXP system, that is, get more EXP when collecting an object depending on the character's level?

    example :

    lvl 1 = 50xp

    lvl 2 = 75 xp

    lvl 3 = 100xp

    etc

    I leave it like this and I didn't know how to continue xD

  • Hi cogote,

    You could use a formula to return the EXP level, which in this case would be:

    (25+25/LEVEL)*LEVEL

    eg.

    (25+25/1)*1 = 50

    (25+25/2)*2 = 75

    and so on.

    Neil

  • Excellent, it worked... but I omitted a detail that I forgot to ask... How do I display a text when the bullet hits the enemy? That is, to show me the damage done to the enemy... I forgot how to do the event :C

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Excellent, it worked... but I omitted a detail that I forgot to ask... How do I display a text when the bullet hits the enemy? That is, to show me the damage done to the enemy... I forgot how to do the event :C

    Hi cogote,

    Assuming the application here is text appearing above each enemy that has been hit. I would:

    1) Create a new text object in the game if you haven't done so already.

    2) Put the enemies into an "Enemy" family. Assuming multiple enemy types, this will make it easier to pick them all later.

    3) Use the "On collision with another object" event trigger when the bullet hits the enemy family.

    4) Add the "Spawn another object" action for the enemy family to spawn an instance of the text object created earlier. Assuming you have different enemy types, you might wish to set this to a specific image point, so you can adjust the location of the text per enemy.

    5) Finally, set the text to the damage done value. Depending on the application, this may be a static number, a variable in the object or a calculation. E.g. you could first subtract the value of the bullet damage away from the HP on the enemy and show this value.

    Hope this helps

    Neil

  • I don't understand how to get it to show me the damage subtracted from the zombie's HP... I was only able to get it to show me the bullet damage in this case... How should I modify the text?

    The bullet has a variable called bullet_damage

  • Hi Cogote,

    It looks like the damage dealt is the subtraction you're making on line 2 to the Zombie. Perhaps it would be better to set a variable first e.g. "DamageDealt" with this value "random(5,10)". You can then use that value to subtract from the Zombie HP and also then use this variable to set your text which appears. In that case you could just put "DamageDealt" into this box once you've declared that variable.

    Neil

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