Posted June 23, 2018 by JustWall
#level #player #code #gml
Hello and Good Day,
"A New Level of Confidence and Power!" - PANTERA
R.I.P Vinnie Paul
Ok - Back to GameDEV!
Under Brush ALPHA Version 1.3 Released! Here is what has been added:
All Very Cool Stuff Added - Lets take some time and chat about the Player Leveling System and how I like to make this type of system work.
1st I will add the Global Variables to be used. I add them to my Global Variable Object: (Example of the Chop Level System Below)
2nd I will make all of this work in a Step Event. This also lives in my Global Variables Object:
The above Code says:
If the player is chopping and the chop level has not reached its cap (20) then the chopping experience should raise .1 per frame.
Then:
The above Code says:
If the player's chopping experience level reaches the max (500) then the player will gain a chopping level, the time its takes to chop a tree down will decrease, the experience for chopping is reset to 0 and a nifty little sound is played. YAY! By implementing the code this way it means that each level raised the player will actually be chopping less per level making it take slightly longer to level up each time.
I implemented this for all 4 of the players skills. Chopping, Mining, Building and Gardening. I also made changes to the Menu GUI to reflect the level system and to show the user what level they are currently at. Totally WIP - So much Menu work still! Never-Ending -
It is interesting to write this out this way. My mind works in code and this is cool to see what it's doing. Hope this Helps someone somewhere.
Life is Short = Be Creative