Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Thanked 236 Times in 233 Posts
    Why not do the data structure first for the weapons and then build the logic based from that data?

    Something like this.
    var oneHandWeapons = {
        'axe': {
            'skills' : ['skill1', 'skill2', 'skill3'],
            'conditions': ['condition1', 'condition2', 'condition3']
        'hammer' : {
            'skills' : ['skill1', 'skill2', 'skill3'],
            'conditions': ['condition1', 'condition2', 'condition3']
    I'm not saying the above structure is correct. I'm just showing a rough example.

  2. #17
    New Coder
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts
    I have indeed done something else now and it is working. Using the same technique as with the other stuff with the "div style="display:block" and so on.

    Many thanks for all the help. At this point I don't care much about the code itself, as long as it's working. I will make the code better once I have a better understanding of javascript and/or jquery.

    I learned HTML and PHP back in the days by just doing stuff, playing around with it and so on. So I will do the same with javascript now

    Thanks again!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts