Graphics

 View Only
  • 1.  Animation Reset

    Posted 03-07-2018 14:32
    Hey guys, me again.

    So I have made this scene that features players getting booked in a sport and so each player has a different animation that makes a yellow card become visible. If I want to remove this, I have also featured a 'reset' animation for each player, that triggers the original scene director in reverse (hope you're still with me).

    The problem is, once I do this reset once, the next time I put the graphic in the reset doesn't work, it seems to get jammed. I tried sticking an event in to go back to frame 0, but this either doesn't work or gets me stuck in a loop. Does anybody know a way to reset an animation?


  • 2.  RE: Animation Reset

    Posted 03-07-2018 15:47
    Hey James, are you taking the graphic offline between or is it staying online?
    #XPression


  • 3.  RE: Animation Reset

    Posted 03-07-2018 16:00
    It's staying online as this is all one giant scene currently
    #XPression


  • 4.  RE: Animation Reset

    Posted 03-07-2018 16:19
    Do you know how to script in XPression? If you do you can make a keyboard shortcut that would play the animation each time for 0 to duration end.
    #XPression


  • 5.  RE: Animation Reset

    Posted 03-07-2018 16:31
    I've done that in my script, but it still seems to be getting stuck when I link it through a GPI Trigger to my dashboard via a button. However, it works again if I open up the scene director and then press the button
    #XPression


  • 6.  RE: Animation Reset

    Posted 03-08-2018 13:41
    Would you be able to upload a small sample showing the problem you are having?
    #XPression


  • 7.  RE: Animation Reset

    Posted 03-09-2018 23:06
    James, I have a few scripts that I use that check the position of the scene director and if the position is over a certain value then the scene director is played backward. Could this be used to animate off the card? It would use the same button as the one that animates on. sort of like "anim on/anim off".
    #XPression


  • 8.  RE: Animation Reset

    Posted 03-13-2018 10:35
    Ooo yes please, that would be great
    #XPression


  • 9.  RE: Animation Reset

    Posted 03-14-2018 14:29

    dim scene as xpScene
    dim fb as xpOutputFramebuffer
    dim scenedir as xpSceneDirector
    dim layer as integer

    engine.GetOutputFramebuffer(0, fb)

    for layer = 0 to 10
    if fb.GetSceneOnLayer(layer, scene) then
    if Scene.Name = "Your Scene name" then
    if scene.GetSceneDirectorByName("your scene director", scenedir) then
    if scenedir.position >= 150 then
    scenedir.PlayRange(150, 0)
    else
    scenedir.PlayRange(0, 150)
    end if
    end if
    end if
    end if
    next

    give this a try. This looks at the position of the "play head" on the scene director. If it is greater than (in this case) 150 then it will play in reverse. This also works on any layer between 0 and 10. (you can change these number to expand the layers it would play on including negative numbers)
    Get back to me if I have made a typo
    #XPression