Graphics

 View Only
  • 1.  pause event (one track only)

    Posted 04-04-2013 19:13
    hi, I think im missing something here, but I want to add an event to pause just one track in the scene director, but the system is designed to pause all tracks at once. Is there a way to do it? also, I noticed some red balls below the track names (expanding the track using the triangle icon)... what are those? I click them and nothing happen.


  • 2.  RE: pause event (one track only)

    Posted 04-04-2013 20:25
    hehe... I think... it is script event right? can anyone help me with the script?

    #XPression


  • 3.  RE: pause event (one track only)

    Posted 04-05-2013 13:09
    No, you can't do that. There can only be one timeline position. However, you can trigger two scenes at once, each with their own timeline. You didn't say why you needed to pause just the one track but it sounds like this might be what you need.

    Before we get to the script I'll explain how it works. The scenes you are triggering will be stacked using the framebuffer layers. Generally you'll want to put the topmost scene online and it will trigger the other scenes below it. There will be two scripts. The first will go on your topmost scene and trigger when the scene goes online. The second will be a script event on the scene director timeline.

    *REPLACE_ME*

    _______________________________

    Set this script to trigger when your topmost scene goes online



    Dim *SCENE_OBJECT_NAME* as xpScene ' -This will be attached to the second scene

    Engine.getSceneByName("*SCENE_NAME*", *SCENE_OBJECT_NAME*) '-Attach the second scene (in quotes) to your defined scene name

    *SCENE_OBJECT_NAME*.SetOnline(0,*LAYER_NUMBER*) 'Put the scene online and choose it's layer

    *SCENE_OBJECT_NAME*.SceneDirector.Play() 'Play the scene


    ____________________________________________

    Place this script as a script event on your topmost scene. Traditionally, the scene director will have events that will play out going forward but when you reach the end, the player direction will pause and reverse direction. When the scene continues, the player position will go in reverse. When it reaches the beginning an event will take it offline. This script event will be located one frame to the left of where the timeline begins to reverse. It should only be triggered from the right.

    This script is going to look at your framebuffer, find the second scene you would like to take offline, and continue playing. (It too will reverse direction, play it's animation in reverse, and then be taken offline as well)

    dim fb as xpOutputFrameBuffer 'Define a FrameBuffer as FB

    dim *Scene_Object_Name* as xpScene 'Use the same name you chose in the first script

    Engine.GetOutputFrameBuffer(0,fb) 'Retrieve FrameBuffer

    fb.GetSceneOnLayer(*Scene_Layer*, *SCENE_OBJECT_NAME*) 'Retrieve Scene From Framebuffer at the layer you chose in previous script

    *SCENE_OBJECT_NAME*.scenedirector.continue() 'Continue Scene, it should be playing in reverse now


    ___________________________________

    This will allow there to be two player positions using different scene director timelines. Once you understand how to call the second scene from the framebuffer, you can use scripting to control the second timeline any way you like.

    #XPression