Graphics

 View Only
  • 1.  Shot Clock with Datalinq

    Posted 12-01-2015 17:18
    Hello everyone-

    First, thanks to everyone that passes their knowledge onto this forum- we are fairly new with XPression and are teaching our students as we learn ourselves. We have an upcoming basketball game that the students have been tasked to build graphics for, but have asked a question in which the answer I was unsure of.

    The students want to have a shot clock for basketball that starts at 25 seconds and begins flashing when the countdown gets to 10 and continues flashing until it hits 0. The data is coming through an All Sport CG v5 via RS232, and we are getting the data just fine, but I wasn't sure on how to have visual logic disseminate that data into the flashing sequence.

    Does anyone have any insight into this?

    Thanks to all-

    Mike Forbes

    Middle Tennessee State University, Murfreesboro, TN


  • 2.  RE: Shot Clock with Datalinq

    Posted 12-01-2015 17:37
    You could probably do it with Visual Logic, but I would do it with a short script on the OnSetText event of the shot clock text object. Create a scenedirector that does the flash animation (it could have a loop event on it that loops after a single flash so it will continue to flash). Name the scenedirector ShotClockFlash.

    Then add a script like this to the OnSetText script event. If your shot clock does not have tenths of seconds you might need to tweak the script a bit.

    `

    dim sd as xpSceneDirector

    scene.GetSceneDirectorByName("ShotClockFlash", sd)

    if text="10.0" then

    sd.Play

    else if CDbl(Text) > 10.0 then

    sd.Stop

    sd.Position = 0

    end if

    `

    #XPression


  • 3.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 14:53
    Brian-

    I had to tweak a little, but I think we got it working in Visual Logic through trial and error.

    On another question, is there a way for XPression to Monitor the datalinq data coming into the system. For example, we want a graphic to fly in every time there is a three pointer made for basketball. I can get datalinq to monitor the actual value, but I can't seem to figure out how to get it to do math with that value.

    For example, If data = (+3) then make 'Quad' Visible

    #XPression


  • 4.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 15:03

    Mike,

    to do this you need to use two text objects one which is datalinqed to the score feed the other not linked at all. The object receiving the data should be hidden and the one not receiving should be the one you display on air. On the hidden object you would run a script onSetText that evaluates its value vs the visible text object and from that you can determine the delta.

    based on that difference you can trigger your effect and then subsequently copy the value from the invisible linked object to the visible static text.

    Example:



    dim data as xpTextObject

    dim displaytext as xpTextObject

    dim quad as xpBaseObject

    Scene.GetObjectByName("my data", data)

    Scene.GetObjectByName("my display text", displaytext)

    Scene.GetObjectByName("my quad", quad)

    If Cint(data.text) - Cint(displaytext.text) = 3 then

    quad.visible = true

    end if

    displaytext.text = data.text

    #XPression


  • 5.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 15:05
    Hi Mike,

    Also search the forum for a thread called: "scoreboard update animation" and you will find lots of discussion and samples about how to do a 3 point animation.

    #XPression


  • 6.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 15:06
    Thank you sir for your help- and it's nice to know there actually is an Andrew Sampson, a name that I seem to find all over everything Ross/XPression comes up with :)

    Mike Forbes

    Middle Tennessee State University, Murfreesboro, TN

    #XPression


  • 7.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 15:08
    They don't let me out much ;-)

    #XPression


  • 8.  RE: Shot Clock with Datalinq

    Posted 12-03-2015 16:32
    "[QUOTE]based on that difference you can trigger your effect and then subsequently copy the value from the invisible linked object to the visible static text."

    Rookie question, but how do you link text objects to copy each other?

    #XPression