Graphics

 View Only
  • 1.  Removing clips from SceneDirector Track

    Posted 10-14-2015 23:12
    Hello all,

    I'm currently working on a sort of Slots-game in XPression.

    Inside there are pictures that are rolling by. The idea is when a combination is formed that the pictures will receive a glow. The company that has designed the graphics has provided me with animations for all of the pictures with the glow. I only have to position them on a Scene Director Track and play them along with the other animations.

    Because I have to be able to switch rapidly between different types of games I'm using the API to randomly generate the pictures, and to create the animation for me.

    This also means I have to place the animations on the Scene Director Track by code, which is not a problem.

    The issue is that when I want to generate multiple animations one after the other I have to clear the old clips from the Scene Director Track to be able to position new ones there. And that's where I have a problem.

    I can't find any method of clearing clips from the Track. I can add them but I can't delete them.

    The code I use to add the clips is:

    // GET THE MATERIAL OF THE PICTURE

    xpMaterial mat;

    engine.GetMaterialByName("Slots_" + imageName + "_" + position, out mat);

    // GET THE TRACK WHERE THE MATERIAL SHOULD BE POSTED

    xpSceneDirectorTrack track;

    scnJackpot.SceneDirector.GetTrackByName("trSlot" + position, out track);

    // CREATE A CLIP AND POSITION IT ON THE TRACK

    xpSceneDirectorClip clip;

    track.CreateMaterialClip(animStartPosition),mat, out clip);


    The only way out I can see for the moment is to use an empty template scene and to create a copy of that scene everytime I want to play a new combination, but ideally I would like to stick to one single scene.

    Any suggestions?


  • 2.  RE: Removing clips from SceneDirector Track

    Posted 10-15-2015 08:36
    It seems that for the moment, you can't delete a clip on a track.

    I suggest if you can, to disable your current track (with old clip), and to create a new one...

    #XPression