I wanna make a system where I can give all my techniques a few stats like maybe level, xp to next level, or number of uses, etc. but I realllly don't wanna be like var/fireballevel,iceballlevel,etc for each skill how do I make a system to apply basic stat sI guess to a skill but save em individually liek if i opened fireball itd say im lv 5 and got 56 uses and got 200 xp to go and then if i open ice storm its completely different based on what I levled and used
|
what exactly are skill 1-3 supose to be cause im wondering how they would be referenced in regards to they information i would need
|
skill_1 could be fireball
skill_2 could be iceball skill_3 could be whatever and you just keep going with how many skills you want. As long as they're under their parent "skills" like up there, they'll each have the variables you see up there. |
i mean in a basic sense how would i display each skills variables in a seeable fashion like how would i be bale to see fireballs exp vs ice balls etc
|
skills how am I supose to place this for verbs it just gives me a error saying fireball.uses is undefined |
You missed a part. You have to list the fireball and every other similar skill under "skills"
skills |
You should probably be showing him how to actually create the fireball and access the variable from it, instead of assuming he knows what your pseudo-code is supposed to be doing.
mob/verb/Fireball() This, of course isn't going to keep track of anything since you're creating the fireball locally and it gets deleted, so you're gonna want to do something a bit more permanent. mob/var/list/my_skills = list() Now, you'd probably want to make things a lot more generic, so you'd want the action of each skill contained in a /skill/proc called Action() or whatever you want, then calling that proc would do things like create the projectile and handle the variable changes needed. As for viewing which skills you have and whatnot, mob/verb/ViewSkills() These are just examples though, you're expected to expand on them yourself and make them work how you need them to work. Good luck :) |
This way skills 1, 2, and 3 each have the same variables "level", "current_exp", and "exp_to_next_level".