The Board Game Hut - Great Games Supported By Great Service
Dismiss Notice
Welcome to Senior Gamers!

We are a community for mature gamers who primarily play online games on PlayStation consoles (PS4, PS3, PS Vita). You can find out more in our About Us section.

If you are new to the site, why not register? By doing so and being an active member you can view the site without adverts, make posts and more. You can register here and even do so using Facebook, Twitter or Google+!

BF3 stats help

Discussion in 'General Discussion' started by LSD-39, 30 Nov 2012.

  1. LSD-39

    LSD-39 Newbie Gamer
    Senior Citizen

    Joined:
    20 Aug 2012
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    0
    PSN:
    LSD-39
    Hey guys, hope you're all keeping well.

    I have a technical question i'd love some help with, I thought HaloJ might know the answer.

    How do I add Crossbow kills to this graphic? That's all the code below, it's my first attempt :D

    // Background image
    image({file:'0pbYggiyf0W6fpwIhf/background 500x130.png', x:0, y:0});

    //Rank Image
    image({ file: p.stats.rank.img_large, x: 430, y: 56, w: 70, h: 70 });

    [​IMG]

    Thanks in advance, hope you all have a merry christmas and a great new year :)
     
  2. HaloJ

    HaloJ Serious Gamer
    Senior Citizen

    Joined:
    28 Apr 2012
    Messages:
    1,362
    Likes Received:
    330
    Trophy Points:
    1,270
    PSN:
    HaloJ
    All available variables can be found in the example data http://api.bf3stats.com/ps3/player/?player=LSD-39&output=sig

    In there you can see that there are two kiss-bows stats.weapons.wasXBS and stats.weapons.wasXBK. Both of these then have a subsection called kills. You'll have to create a variable and then process the kill count before outputting it as text.

    Something like :
    Code:
    var killtotal = 0;
    killtotal  = (stats.weapons.wasXBS.kills + stats.weapons.wasXBK.kills);
    
    text ({x: 10, y:10, size:8, text:'Total Kills'});
    text ({x: 40, y:10, size:8, text:killtotal});
    Although the above should be wrapped in sanitisers checking if the stats.weapons.wasXBS.kills etc exists before actually referencing them but so long as they do that'll work. There's plenty of example code kicking about the place though and some more on the BFStats Forums. Most of it is just common sense and analysis of the above linked example data. Although doing silly percentile graphs is a little more complex.

    As for Senior Gamers, we're doing well, thanks. Interest waned in BF3 but has picked back up again as other titles have died back, loving Aftermath. Borderlands 2 rocks. Fun driving on GT5 on Saturday nights and we're continuing on with cross community matches and socialising. :thumbup:

    Abs
     
  3. LSD-39

    LSD-39 Newbie Gamer
    Senior Citizen

    Joined:
    20 Aug 2012
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    0
    PSN:
    LSD-39
    Thanks, worked a treat :)

    [​IMG]
     
  4. ColSonders

    ColSonders A.W.O.L.
    Senior Citizen

    Joined:
    26 Jun 2012
    Messages:
    2,394
    Likes Received:
    933
    Trophy Points:
    1,524
    PSN:
    ColSonders
    You know that's not how you spell Crossbow right?
     
  5. LSD-39

    LSD-39 Newbie Gamer
    Senior Citizen

    Joined:
    20 Aug 2012
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    0
    PSN:
    LSD-39
    :D :D Worked all day on that mate, not changing it now.
     
  6. Jkrohn1

    Jkrohn1 5P4M 80T
    Senior Citizen

    Joined:
    29 Jun 2012
    Messages:
    3,677
    Likes Received:
    439
    Trophy Points:
    1,365
    PSN:
    JKrohn1
    Your a rank 100 :-O
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice