Graphics

 View Only
  • 1.  Script to call other scene directors

    Posted 09-13-2018 15:13

    Hello,

    I'm trying to write a script to play other scene directors based upon the bounding box height but it doesn't seem to be working.

    Does anyone have any ideas?

    dim MessageIN as xpTextObject

    Dim Box0to1 as xpSceneDirector
    Dim Box0to2 as xpSceneDirector
    Dim Box0to3 as xpSceneDirector
    Dim Box0to4 as xpSceneDirector
    Dim Box0to5 as xpSceneDirector


    Scene.GetObjectByName("Message", MessageIN)

    Scene.GetSceneDirectorByName("0 to 1", Box0to1)
    Scene.GetSceneDirectorByName("0 to 2", Box0to2)
    Scene.GetSceneDirectorByName("0 to 3", Box0to3)
    Scene.GetSceneDirectorByName("0 to 4", Box0to4)
    Scene.GetSceneDirectorByName("0 to 5", Box0to5)


    'one line
    If MessageIN.boundingboxheight=32 then
    Box0to1.Play()

    'two line
    Else If MessageIN.boundingboxheight=71 then
    Box0to2.Play()

    'three line
    Else If MessageIN.boundingboxheight=110 then
    Box0to3.Play()

    ' four line
    Else If MessageIN.boundingboxheight=149 then
    Box0to4.Play()

    'five lines
    Else If MessageIN.boundingboxheight=188 then
    Box0to5.Play()

    End If


  • 2.  RE: Script to call other scene directors

    Posted 09-13-2018 16:07
    Hi,

    Try MessageIN.BoundingBox.Height ;)
    #XPression


  • 3.  RE: Script to call other scene directors

    Posted 09-13-2018 16:40
    Hello!

    Thanks! I've tried that as well. I'm not sure if I need to reset the scene directors? It doesn't seem to consistently play.
    Any other ideas?
    #XPression


  • 4.  RE: Script to call other scene directors

    Posted 09-13-2018 17:12
    Where is this script? In OnOnline or OnSetText?
    #XPression


  • 5.  RE: Script to call other scene directors

    Posted 09-13-2018 17:19
    If this is in OnSetText, and the text object "message" is also published; you are going to run into issues because Message may not have already been updated with the new published data from the sequencer. In other words when the scene is being prepared to go online, you cant guarantee if Message will be updated before or after whatever text object this script is in.
    #XPression


  • 6.  RE: Script to call other scene directors

    Posted 09-14-2018 18:17
    Hello!

    This is a script in a scene director. There is a copy prior to this that works but it doesn't seem to run this script even when I simply the scene.
    The idea when the scene director plays it will decided which other scene director to play.
    I can't use transition logic as the program controlling the XPression doesn't give and play online command, it only runs a scene director.
    Thanks again for the help!
    #XPression


  • 7.  RE: Script to call other scene directors

    Posted 09-17-2018 22:04
    Lesley sent her script to me and I've changed it to use .linecount instead of .boundingbox.height. Seems to be working now. I also changed it to be .PlayRange instead of .Play.
    #XPression