r/TagPro • u/robopuppycc Flail ~ ((Antagloble4edes)) ~ RHCP? • May 20 '15
[Userscript] Time on Ball
This is a simple script intended to help with focus while playing. Basically, it shows you the last two digits of the time on your ball, with the intention of making powerup callouts a bit easier.
In action: http://i.imgur.com/qsOkd1W.png
Here's the script: http://pastebin.com/GjFy1p5b
I used ballparts' excellent afk timer script as a basis for this. If anyone has insight and can figure out how to programmatically center the text on the ball, I'm really interested. I just guess-and-checked until it lined up, but I'm sure there's a more graceful solution.
Hope this script helps!
Edit: Fixed pastebin link
Edit: Approved by Ash and asdf for competitive play!
Edit: Better version with spin and centeredness courtesy of /u/DatBlizzard and /u/snaps_
2
u/[deleted] May 20 '15
now... make the numbers rotate! awesome script btw!
2
u/snaps_ snaps||radius May 20 '15
Here is a version that adds rotation and the information that Some Ball -1 mentioned below to center the text a little more accurately.
6
u/DatBlizzard Some Ball -1 May 20 '15
If you add the
timerTextto the player's sprite instead of the ui layer then you can center the text by setting it's position to(20,20)and settimerText.anchor.x = timerText.anchor.y = 0.5which means the position is based on the center of the PIXI object instead of its default top-left corner.Check out one of those ball spin overlay scripts to see what I mean, they do exactly that.
1
u/mmartinutk Macho | JuicyJuke May 20 '15
Oh man... at first glance I thought this was a script that had how long you've held the flag on your ball, and now I want that script.
Someone make it pls.
1
u/[deleted] Oct 16 '15
Is there a script with updated centerness but without the spin? I was using the first version of the script until now but the lack of centerdness is annoying
1
u/Reaxram | Reaxram | $ Ex member of Moneyballs $ May 20 '15 edited May 20 '15
I'm still new to javascript but I think to center the text you'd have to make this change:
var TEXTLOCATION_HOR = 0.0;var TEXTLOCATION_VER = 0.0;1
u/QuantumJuker I love curry. | Centra May 20 '15
Darn I have the flair on my ball.
1
u/18skeltor anti-timer luddite / First / Origin May 20 '15
Didn't know I needed this. Seems very helpful for me pup%!
1
u/sizviolin Fairy // B€ May 20 '15
For some reason it turns itself off every few games, only to be working again the next one usually. Any idea why that might be? Another userscript interfering with it maybe?