Digital Meter
by Tim Doty · in Torque Game Builder · 08/03/2005 (7:26 pm) · 2 replies
I've worked out a "digital meter" that I'm fairly happy with and which is coded to be as general as possible. It takes any imagemap whose parts 0 to 9 match the digits zero to nine, updates on a schedule via arbitrary function (e.g., "$HighScore" or "$MyCar.getSpeed()"), color setable, arbitrary position using either center or a corner for orientation. I haven't gotten around to having a flag for auto-sizing the number of digits to display, but it would be easy enough to add.
The question is, is there interest in the code?
The question is, is there interest in the code?
About the author
#2
But to make it really solid you'd want a way to handle numbers changing faster than the animation. Interesting problem, but not one I have time to deal with ATM. I'm not sure how to go about submitting a resource, but I'll go ahead with what I've got.
08/04/2005 (3:09 pm)
No rotating number... That should be doable using animations of the transitions. I hadn't really thought about it so I'm not sure how much additional work would be involved to make that go. The alternative would be to do the animating in T2D. Off the top of my head I don't remember any way to do image cropping on the fly, but with some additional gimmicking that should be workable, too.But to make it really solid you'd want a way to handle numbers changing faster than the animation. Interesting problem, but not one I have time to deal with ATM. I'm not sure how to go about submitting a resource, but I'll go ahead with what I've got.
Torque 3D Owner Tom Feni
probably would be great for a t2d resource.. :)
I am just using a gui to show the score.. does this do a rotating type number that spins.. thatw ould be cool.. :)