View Only
  • 1.  Operator Customizable animated count up?

    Posted 09-27-2022 01:42

    I have been asked to make a L3 element for an NHL team in which they can display different types of numerical information such as:

    Max Skate Speed (MPH)
    Time on Ice
    Distance Skated
    Puck Possession
    Etc, Etc

    They want the display to start at a zero value that counts up to the final value as the element animates on. So, basically I want to set something up in which the operator can enter a number value, say 5:35 for time on Ice, and then have a sort of counter / timer style text display that starts at zero and animates the value up to 5:35 in the 1.5 seconds it takes for the lower 3rd to full reveal and build on. 

    I realize that 3 of these values need to be formatted for time, and one for speed, I just figured I would have a toggle to make the appropriate numerical format for the need be the active one, but I figure the underlying principle to achieve this should be the same.

    I have looked into both the widgets and the VL blocks associated with counters / timers and none of them seem to give me exactly what I am looking for, but I figure there has to be a way to do this.

    Thanks in advance for any tips

    Willie Frazier

  • 2.  RE: Operator Customizable animated count up?

    Ross Staff
    Posted 09-27-2022 04:42
    Do you want it to count up accurately or you just want an kind of animation that does it quickly. 

    What I do when I want to do a faster than real-time counter is make an animation of a hidden object (we don't have NULL objects so I use an Event object or hidden quad to be one). I make a keyframe of 0 X Position at 0 and a keyframe of 1 X Position at the duration I require, for example 50. 

    Then I take it's Position X value and multiple it by the final value I wish it to be. 

    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom

  • 3.  RE: Operator Customizable animated count up?

    Posted 09-27-2022 08:01
    Hi Willie.
    I agree with Red, but for Time on Ice it's better to use the script below.
    Set it to OnRender and set the text input format to 00:00:00.
            Dim intxt, outtxt As xpTextObject
            self.GetObjectByName("InTime", intxt)
            self.GetObjectByName("OutTime", outtxt)
            Dim hide As xpBaseObject
            self.GetObjectByName("Hide", hide)
            Dim tempTime As System.TimeSpan
            TimeSpan.TryParse(intxt.Text, tempTime)
            outtxt.Text = (TimeSpan.FromSeconds(tempTime.TotalSeconds * hide.ScaleX)).Minutes.ToString("00") + ":" + (TimeSpan.FromSeconds(tempTime.TotalSeconds * hide.ScaleX)).Seconds.ToString("00")​

    Roman Yaroshenko
    chief specialist
    Moscow Russian Federation