Graphics

 View Only
Expand all | Collapse all

Score change animation

  • 1.  Score change animation

    Posted 06-14-2022 17:16
    I know I have seen it somewhere on the User Community before, but I cannot seem to find it. All I want to do is run an animation based on a datalinq value change. For instance in basketball if a 3 is made, I want to run a 3pt animation in the scorebox and then go back to the score.

    ------------------------------
    Jeff Bins
    AV Production Manager

    Green Bay United States
    ------------------------------


  • 2.  RE: Score change animation

    Ross Staff
    Posted 06-15-2022 05:17
    You'll want something like this on the text object with the datalinq value. Where I have put 0 and 60 you can put your start and end keyframes or use something like sd.duration as your end keyframe. 

    dim sd as xpSceneDirector

     

    scene.GetSceneDirectorByName("3Points", sd)

     

    sd.PlayRange(0, 60)





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



  • 3.  RE: Score change animation

    Posted 06-16-2022 10:40
    I used the script above and it works great!

    However on my Away Score animation. If I bring the bug online, it will run the away animation if the data value is "1". The home side does not do this.

    I did modify the script a little bit:

    dim sd as xpSceneDirector
    scene.GetSceneDirectorByName("AwayGoal", sd)
    if CInt(text) - CInt(self.text) = 1 then
    sd.PlayRange(0, sd.duration)
    end if


    Any thoughts?

    ------------------------------
    Jeff Bins
    AV Production Supervisor
    PMI ENTERTAINMENT - RESCH CENTER
    Green Bay United States
    ------------------------------



  • 4.  RE: Score change animation

    Ross Staff
    Posted 06-23-2022 14:53
    Check your script, most likely just a naming error on "HomeGoal" if it is working for away goal.

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



  • 5.  RE: Score change animation

    Posted 06-30-2022 22:02
    Hi there,Because the data will be updated immediately, the updated results have been seen before the animation is broadcast.
    If I want to update the data after the animation is played, is there any good way?

    ------------------------------
    alan
    ------------------------------



  • 6.  RE: Score change animation

    Posted 08-19-2022 07:03
    Hi Alan
    I can offer you this option. There are two objects: the first one is a hidden text object "InText", connected to the DataLink and a script that starts scenedirector.play is connected to it, the second is a text object "OutText"  whom shows the score.
    In the scenedirector, put a script  "...OutText.Text = InText.Text"

    ------------------------------
    Roman Yaroshenko
    chief specialist
    RBC-TV
    Moscow Russian Federation
    ------------------------------



  • 7.  RE: Score change animation

    Posted 08-18-2022 17:22
      |   view attached

    Red, 
    Both animations work when the score changes. Just when the away value = 1, the scene director GOAL animation triggers when the scene goes online. The Home score does not. I attached a GIF that shows the home score at 1 and the away score at 2 going online. Then I change the value to 1 on the MAD, and when coming online it plays the goal animation. 

    https://bit.ly/3CdPYoP

    ------------------------------
    Jeff Bins
    AV Production Supervisor
    PMI ENTERTAINMENT - RESCH CENTER
    Green Bay United States
    ------------------------------



  • 8.  RE: Score change animation

    Ross Staff
    Posted 08-22-2022 03:53
    My instinct is you want to put some logic on your onsettext that checks the state of the scene. You could do a check such as what state is the "in" scene director, if its playing then don't play your goal animation. When I get a moment I'll test something.

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



  • 9.  RE: Score change animation

    Posted 09-06-2022 09:17
    Red, 

    I took a look, and all I have set for the OnSetText for the home and away datalinq's is:

    dim sd as xpSceneDirector
    scene.GetSceneDirectorByName("AwayGoal", sd)
    if CInt(text) - CInt(self.text) = 1 then
    sd.PlayRange(0, sd.duration)
    end if

    Just sub Home for Away for the home side. 

    I do have some visual logic set up as I was testing that way to make this work but I have it disabled. This was also for the home side, not the away side. The first visual logic screen is setup to change period values and the 3rd is empty. 

    I am starting to run out of ideas. 



    ------------------------------
    Jeff Bins
    AV Production Supervisor
    PMI ENTERTAINMENT - RESCH CENTER
    Green Bay United States
    ------------------------------



  • 10.  RE: Score change animation

    Posted 09-06-2022 14:22
    I ended up just putting the animations into there own scene and that fixed the issue.

    ------------------------------
    Jeff Bins
    AV Production Supervisor
    PMI ENTERTAINMENT - RESCH CENTER
    Green Bay United States
    ------------------------------



  • 11.  RE: Score change animation

    Posted 09-06-2022 16:05
    Now the animation runs when the group is put on when the home data value = 5.... I am starting to become confused as to why it thinks it should run at random times and values going from offline to online states.

    ------------------------------
    Jeff Bins
    AV Production Supervisor
    PMI ENTERTAINMENT - RESCH CENTER
    Green Bay United States
    ------------------------------



  • 12.  RE: Score change animation

    MalThePal
    Posted 09-08-2022 19:19
    Jeff,
    I have always had great success with the following script placed in the ON SET TEXT for the score. My text objects are ScoreA and ScoreB

    dim ScoreB as xpTextObject
    dim ac as xpAnimController

    scene.GetObjectByName("Away.ScoreB", ScoreB)
    ScoreB.text = self.text

    scene.GetAnimControllerByName("Score.Away",ac)
    ac.PlayRange (0,30)

    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 13.  RE: Score change animation

    Ross Staff
    Posted 09-12-2022 04:56
    Hey Jeff,

    I use the scene state to stop my scripts running when I don't want. For example if I don't want my onset text script to run when its online instead of all the time I use something like. 

    dim state as OnlineState
    dim sd as xpSceneDirector

    scene.GetOnlineState(state)
    scene.GetSceneDirectorByName("SceneDirector1", sd)

    if state = 5
    sd.Play
    else

    end if

    In this example I have another scene director set as default as well.



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