Those of you with short attention spans may want to leave now, as there will be GML.
Earlier I mentioned the simple rpg mechanics, in fact I mentioned them at 12:05 this morning.... wow I post fast.
At any rate I'm sure you know what exp is, but you earn it in a totally original manner, by killing stuff.
Most enemies give a single experience point, boss sections also give one with the core giving 20.
When you get 100 exp you level up, resetting the counter and giving you a new ability.
![]() |
Almost There |
Time to get more technical. I did warn you did I not?
Exp and level are handled by two global variables[1] to put it in GML[2] when an enemy dies this happens-
global.var_exp = global.var_exp + 1 simple I know, but it gets the job done.
But how do you actually level up you may[3] be asking! Well it's simple, or not that simple.
if global.var_exp > 99
then {global.wlvl = global.wlvl + 1
global.var_exp = 0}
See just an if then statement, in english it says if exp is greater[4] than 99 then increase weapon level and reset experience back to zero.
So how does that make you more powerful? Well it's simple, when you shoot the variable global.wlvl[5] is checked, and if it's high enough the good stuff gets fired.
And I think that's enough for this post. Next time I'll talk about some other complicated thing[6].
If anybody actually read this and want's to know something, leave a comment below and maybe that will be what the next update is about.
1:Global variables are variables not assigned to a single instance of an object and can be called by anything.
2:Game Maker Language.
3:Or may not.
4:The greater than is a contingency in case you wind up with more than 100 exp somehow, like killing the core at more than 80 exp.
5: Short for weapon level, in case you where wondering.
6:I love footnotes, especially the snarky ones.
No comments:
Post a Comment