Graphics

 View Only
Expand all | Collapse all

Script for calling objects in other scenes

  • 1.  Script for calling objects in other scenes

    Posted 10-20-2015 10:31
    Hi,

    Does anyone know the proper syntax for calling an object in a scenegroup from another scene?

    I want to set an object's alpha value to zero at a certain point in a scenedirector in the parent scene.

    I've tried this:

    dim ContentText as xpBaseTakeItem

    dim FB1 as xpOutputFrameBuffer

    Engine.GetOutputFrameBuffer(0, FB1)

    FB1.GetTakeItemOnSceneLayer(0, ContentText)

    ContentText.SetOffline()

    Unfortunately this doesn't do the trick as I need the text in the scenegroup to disappear some frames before the parent scene goes offline.

    Any help would be appreciated, thanks.


  • 2.  RE: Script for calling objects in other scenes

    Posted 10-20-2015 17:05
    To achieve that, put your code in an even marker on the parent scene. After, in your code, you have to add a .GetObjectByName then a .alpha (or .fadeTo)...

    #XPression


  • 3.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 13:30
    Hi Vincent,

    This did not work. Also the scene will not play the out-animation after the pause in the scenedirector unless I add a "wait for key" in sequencer...

    I've added a scriptevent in the parent-scenedirector which calls the textobject which I want to control, but it dosen't seem to have any effect.

    #XPression


  • 4.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 13:35
    FB1.GetTakeItemOnSceneLayer(0, ContentText)

    should be

    FB1.GetSceneOnLayer(0, ContentText)

    #XPression


  • 5.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 14:19
    Actually the script should be more like:

    dim text as xpTextObject

    dim fb as xpOutputFrameBuffer

    Engine.GetOutputFramebuffer(0, fb)

    fb.GetSceneOnLayer(0, scene)

    scene.GetObjectByName("Text1", text)

    text.visible = false



    #XPression


  • 6.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 14:21


  • 7.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 14:49
    Not sure about the issue with pauses..

    Dose the pause happen in the same time frame as a take item transition?

    #XPression


  • 8.  RE: Script for calling objects in other scenes

    Posted 10-29-2015 14:49
    Not sure about the issue with pauses..

    Dose the pause happen in the same time frame as a take item transition?

    #XPression


  • 9.  RE: Script for calling objects in other scenes

    Posted 10-30-2015 08:15
    The pause happens in the same time frame as the script which should take the text off, but I've tried to shift the script and nothing worked. There is no take item transition in the sequencer as this contains a videofile which has the "animation"..

    #XPression


  • 10.  RE: Script for calling objects in other scenes

    Posted 10-30-2015 12:09
    BTW, the script you posted works fine in a normal scecne, but not in a scenegroup.

    #XPression


  • 11.  RE: Script for calling objects in other scenes

    Posted 10-30-2015 19:32
    Ah, scenegroups, that changes things a lot.

    Are you trying to pause something that is happening in a child scene on your scenegroup?

    Can you post a copy of what you are working on so I can get a better idea of it?

    #XPression


  • 12.  RE: Script for calling objects in other scenes

    Posted 09-20-2016 08:34
    Hi @garner. Forgot about this as I found a work around some time ago, but I`ve run into a similar issue.

    Anytime I add a pause in a Scenedirector on a Scenegroup I`m not able to continue playing/resume after the pause. Why is this?


    #XPression