Hello to begin with i'm a newb coder...I'm making an rpg demo to start getting used to this code thing :P.I've made the basic lvl up etc. but I forgot to make a gain exp proc (don't got an idea how to). Well the way I want the player to gain exp is by killing another mob (npc or player;an expecific exp for different npcs).Mind someone help me?Thanks
Example of the proc?please because I've coded the npc or player dies when his Stamina reach 0 and with the death check proc it auto kills them so I don't know how should I code the killer thing DX
|
mob/var This is a basic idea. I didn't define most of the variables prior to use. But you should get the idea. |
You could define what EXP each NPC provides as a variable belonging to that NPC, for now, but later on you could do something like divide the NPC's level by the player's level, and grant them EXP based on that. Just a thought; it's much neater than manually giving each NPC a set amount of EXP to provide.