Matt Posted July 13, 2012 Author Share Posted July 13, 2012 I'm working on a skill system. I'm not the best at coding, so i'm a bit confused as to how to do certain things. My biggest issue is how to set the levels in the skill system. Since i've never seen it done before, nor have i ever seen anything like it be done in EO, i'm stuck. Can anyone give me advice on where to start?EDIT: Because the skills are a part of the player, should i place something like``` Woodcutting As Byte Woodcuttingxp As Long```In PlayerRec? Link to comment Share on other sites More sharing options...
Faulty Posted July 13, 2012 Share Posted July 13, 2012 ttheres a spells system already Link to comment Share on other sites More sharing options...
Matt Posted July 13, 2012 Author Share Posted July 13, 2012 Not spells, skills. Skills such as Woodcutting, mining, and fishing. Just because the tab is called "skills" doesnt mean they are. They are, as you say, "Spells". Link to comment Share on other sites More sharing options...
Faulty Posted July 13, 2012 Share Posted July 13, 2012 Use The event system it will be very helpful to you Link to comment Share on other sites More sharing options...
Matt Posted July 13, 2012 Author Share Posted July 13, 2012 How would that help me? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 13, 2012 Share Posted July 13, 2012 First, make a SkillRec, which will contain all the info for an individual skill, (such as the player's level in that skill). Let me make an example:```Public Type SkillRec Name As String * 20 Level As Long Exp As LongEnd Type```Afterwards, create an enum:```Public Enum Skills Mining = 1 Fishing ' always at bottom: SKILL_COUNTEnd Enum' comment: Skills.Mining = 1, Skills.Fishing = 2```This will allow you to reference skills by name, rather than by number. In addition, it will add a SKILL_COUNT:Then, in PlayerRec, add:```Skill(1 To SKILL_COUNT - 1) As SkillRec```I think you can guess where this is going:```Player(index).Skill(Skills.Mining).Level = Player(index).Skill(Skills.Mining).Level + 1```4 new replies.@Faulty:> ttheres a spells system already@Faulty:> Use The event system it will be very helpful to youThose are unrelated to the current problem. Link to comment Share on other sites More sharing options...
Matt Posted July 13, 2012 Author Share Posted July 13, 2012 @Soul:> First, make a SkillRec, which will contain all the info for an individual skill, (such as the player's level in that skill). Let me make an example:> ```> Public Type SkillRec> Name As String * 20> Level As Long> Exp As Long> End Type> > ```> Afterwards, create an enum:> > ```> Public Enum Skills> Mining = 1> Fishing> ' always at bottom:> SKILL_COUNT> End Enum> ' comment: Skills.Mining = 1, Skills.Fishing = 2> > ```> This will allow you to reference skills by name, rather than by number. In addition, it will add a SKILL_COUNT:> Then, in PlayerRec, add:> > ```> Skill(1 To SKILL_COUNT - 1) As SkillRec> ```> I think you can guess where this is going:> ```> Player(index).Skill(Skills.Mining).Level = Player(index).Skill(Skills.Mining).Level + 1> > ```> 4 new replies.> > Those are unrelated to the current problem.Just curious, shouldn't```Skill(1 To SKILL_COUNT - 1) As SkillRec```be something like```Skill(1 To Skills.SKILL_COUNT - 1) As Long```? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 14, 2012 Share Posted July 14, 2012 @Sigridunset:> Just curious, shouldn't```> Skill(1 To SKILL_COUNT - 1) As SkillRec> ```be something like```> Skill(1 To Skills.SKILL_COUNT - 1) As Long> ```?If you want to. It's just a style preference, you can do it with or without the "Skills.", I believe. Link to comment Share on other sites More sharing options...
or3o Posted July 14, 2012 Share Posted July 14, 2012 http://www.touchofdeathforums.com/smf2/index.php/topic,71740.0.htmljust do this tutorial and rename the skill whatever you want instead of swords. Link to comment Share on other sites More sharing options...
DMF Posted January 26, 2013 Share Posted January 26, 2013 O.ocookie.anyways isnt wood cuting already done with the resources?? o-o Link to comment Share on other sites More sharing options...
abhi2011 Posted January 27, 2013 Share Posted January 27, 2013 Necroposting? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now