Graphics

 View Only
  • 1.  Powerplay Timers

    Posted 04-18-2017 20:15
    On my scorebug I have a wing that pops down that displays powerplay team, 4x4, 5x3, etc. Is there a way to automate this based on the values of the Datalinq from Dak? I currently have some visual logic setup to drop down the bar I have made, but now I am looking for a "what if" if there are multiple penalties, or to have the graphic switch when I timer runs out. Anybody have any thoughts?


  • 2.  RE: Powerplay Timers

    Posted 04-21-2017 15:54

    Here is a code that I have started for the above. Hoping someone may be able to help and see if I am close. I know little about scripting, so any help is appreciated. Once I get this first one down I think I should be okay.



    dim vistimer as xpTextObject
    dim hometimer as xpTextObject
    dim oddmantimer as xpTextObject

    dim vis as string
    dim home as string
    dim odd as string

    dim x as integer

    dim SceneDirectorHomeIn as xpSceneDirector
    dim SceneDirectorHomeOut as xpSceneDirector
    dim SceneDirectorVisIn as xpSceneDirector
    dim SceneDirectorVisOut as xpSceneDirector
    dim SceneDirectorOddIn as xpSceneDirector
    dim SceneDirectorOddOut as xpSceneDirector

    self.getSceneDirectorByName("HomePenaltyIn", SceneDirectorHomeIn)
    self.getSceneDirectorByName("HomePenaltyOut", SceneDirectorHomeOut)
    self.getSceneDirectorByName("VisitorPenaltyIn", SceneDirectorVisIn)
    self.getSceneDirectorByName("VisitorPenaltyOut", SceneDirectorVisOut)
    self.getSceneDirectorByName("SpecialPenaltyIn", SceneDirectorOddIn)
    self.getSceneDirectorByName("SpecialPenaltyOut", SceneDirectorOddOut)

    self.getobjectbyname("vistext2", vistimer)
    self.getobjectbyname("HomeTime", hometimer)
    self.getobjectbyname("OddManTime", oddmantimer)

    vis = vistimer.text
    home = hometimer.text
    odd = oddmantimer.text

    if home = "x" and vis = "" then

    SceneDirectorVisIn.PlayRange(0, SceneDirectorVisIn.Duration)
    SceneDirectorHomeOut.PlayRange(0, SceneDirectorHomeOut.Duration)
    SceneDirectorOddOut.PlayRange(0, SceneDirectorOddOut.Duration)

    end if


    #XPression


  • 3.  RE: Powerplay Timers

    Posted 04-27-2017 15:10
    Are you able to upload a sample scene to dropbox or somewhere? It's hard to debug a script without the scene it belongs with.

    #XPression


  • 4.  RE: Powerplay Timers

    Posted 04-27-2017 18:39
    There may be some issues with your approach. The OnOnline script is only executed once, when the scene first goes online. So this will not continually check the powerplay timers and drop down the clock once the bug is already online. You should try using OnSetText scripts instead.

    This script attached to the "HomeTime" text object's OnSetText method will be executed every time the clock value from the Dak is changed.


    dim sd as xpSceneDirector

    scene.GetSceneDirectorByName("HomePenaltyIn", sd)

    if text = "2:00" then
    sd.PlayDirection = PlayDirection.pd_Backward
    sd.Play
    else
    sd.PlayDirection = PlayDirection.pd_Forward
    sd.Play
    end if


    It will run the scene director forward whenever the value is not 2:00, and hide it when it becomes 2:00.. This may not really be the logic you need; but hopefully this helps you better understand how to run a scene director based on data.

    Actually getting all the timers to work and such for hockey is a very complicated task; and usually broadcasters use full blown applications to understand all the logic required for powerplays, 4x4, 5x3 etc..

    http://www.bannisterlake.com/ and http://www.stripe.tv are two examples of companies that make hockey scorebug controllers for XPression.
    #XPression