BF3 stats help

LSD-39

Newbie Gamer
Senior Citizen
Joined
20 Aug 2012
Messages
55
Reaction score
0
Points
0
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 });



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

HaloJ

Serious Gamer
Senior Citizen
Joined
28 Apr 2012
Messages
1,385
Reaction score
358
Points
1,270
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. :1thumbup:

Abs
 

LSD-39

Newbie Gamer
Senior Citizen
Joined
20 Aug 2012
Messages
55
Reaction score
0
Points
0
Thanks, worked a treat :)

 

ColSonders

A.W.O.L.
Senior Citizen
Joined
26 Jun 2012
Messages
2,394
Reaction score
933
Points
1,524
You know that's not how you spell Crossbow right?
 

LSD-39

Newbie Gamer
Senior Citizen
Joined
20 Aug 2012
Messages
55
Reaction score
0
Points
0
:D :D Worked all day on that mate, not changing it now.
 

Jkrohn1

5P4M 80T
Senior Citizen
Donator
Joined
29 Jun 2012
Messages
3,693
Reaction score
455
Points
1,365
LSD-39 said:
:D :D Worked all day on that mate, not changing it now.
Your a rank 100 :-O
 
Top