CHARACTER GAINS EXPERIENCE AND LEVELS UP

Hello everyone, I am creating a platform game where a hero kills enemies with arrows.

I would like my hero to level up with the experience that enemies give by killing them.

For example, an enemy gives away 8000 experience and level up my hero.
I also need to know how I can make my character go up 100 levels (maximum LEVEL) and each level needs an experience (x) to pass it?

On the other hand I also want the enemy to drop some items as equipment for my hero with 15% chance. I don’t know much about the program and I appreciate your help.

Thank you very much for the person who can help me

I’m still pretty new to this, so there might be a better solution. For the XP, I would start with global variables and use a few children.

Global Variable–Levelup.XP for example to track overall XP score. I would set your Global Variable to 0 and “change Global Variable add value” when you’ve accomplished a condition/ defeated an enemy.

You can use modify text as an action when your global variable of Levelup.XP reaches a certain value set global variable Levelnumber to X. This would allow you to show Level 1 or Level 100 once a value is reached.

You could use a GlobalVariableString() to have certain features such as inventory or abilities get displayed once you reach a certain level. I’m reaching here since I haven’t tried this yet in your application. If you don’t understand what I’m saying, follow the tutorial video below.

I personally think this guy has the best gdevelop tutorials. I wish he had more… For max level? I would set global variable of Levelnumber to 100. I hope this helps.

2 Likes