Graphics

 View Only
  • 1.  How to take online and playout a scene automatically when data conditions are met

    Posted 29 days ago
    Visual Logic conditions for XPression auto playout of scene

    (1) last shot is by home team, and

    (2) shot speed is higher than 100km/hr).  

    I can use Visual Logic to set up conditions, but I don't know to script an automatic playout based on my criteria.  Can someone help me with this?  Thanks in advance!



    ------------------------------
    Sonja Broomfield
    On-Air graphics (Duet & Xpression)
    Freelance
    Canada
    ------------------------------



  • 2.  RE: How to take online and playout a scene automatically when data conditions are met

    Posted 28 days ago

    Hi Sonja,
    if I understand it right, you have got one scene online and you want to trigger another scene under the described conditions.

    Add the following 2 Scripts to your MainScene:

    Sub OnOnline(Engine as xpEngine, Self as XpScene)
    Dim SceneToBeCalled as xpScene
    'Get a handle to the scene to be called. If the scene does not exist EXIT
    If Not Engine.GetSceneByName("Scene2", SceneToBeCalled, False) then Exit Sub
    Dim probe as xpTextObject
     
    ' Check the conditions
    If Self.GetObjectByName("LAST SHOT SPEED",probe) then
    If val(probe.Text) < 100 then Exit Sub
    End If
     
    If Self.GetObjectByName("TRI",probe) then
    If probe.Text <> "MTL" then Exit Sub
    End If
     
    ' So we know know that all conditions are met
    ' Let´s call Scene2 into FrameBuffer 0 on Layer 1
    SceneToBeCalled.SetOnline(0,1)


    Sub OnOffline(Engine as xpEngine, Self as XpScene)
    'Set the other scene offline, when this scene goes offline
    Dim SceneToBeCalled as xpScene
    If Engine.GetSceneByName("Scene2", SceneToBeCalled, False) then
        SceneToBeCalled.SetOffline()
    End If
    ________________________________________________________________________

    The second script is to set scene2 offline if scene1 is going offline. Don´t know if you need this.

    If you want to show the second scene while scene1 is already online and just the Text is changed you need a little more. Let me know.



    ------------------------------
    Tom Lehmann
    CEO
    IT Services
    Frankfurt/Main Germany
    ------------------------------



  • 3.  RE: How to take online and playout a scene automatically when data conditions are met

    Posted 25 days ago

    The scene in question is a stand-alone scene played out in Layer 1 over any scene on Layer 0.  It flies in the 'last shot' information (if the last shot meets the two conditions), then flies out and takes itself offline.  The scene works without a macro, but I must play it out manually because I can't find a way to trigger it based on conditions.



    ------------------------------
    Sonja Broomfield
    On-Air graphics (Duet & Xpression)
    Freelance
    Canada
    ------------------------------



  • 4.  RE: How to take online and playout a scene automatically when data conditions are met

    Posted 28 days ago

    Hi Sonja,
    a second approach you could do is putting the content of scene2 as a group into scene1.

    In this case you could do it in visual logic by setting this group invisible if the conditions do not met.
    There is imho no way to adress a different scene from within visual logic.

    Tom



    ------------------------------
    Tom Lehmann
    CEO
    IT Services
    Frankfurt/Main Germany
    ------------------------------



  • 5.  RE: How to take online and playout a scene automatically when data conditions are met

    Posted 28 days ago

    One idea I had that would have minimal scripting would be if those conditions are met they play a scene director. 

    That scene director could have a script on it that takes the scene on air. 

    dim take1 as xpTakeItem

    Engine.sequencer.getTakeItemByID(1001,take1)

    take1.execute



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