Graphics

 View Only
  • 1.  Script not changing layer of Scene

    Posted 12-15-2013 01:48
    Figured that this would move the current scene to another layer, but alas it will not:

    Dim OutputFB as xpOutputFrameBuffer

    Dim OutgoingCG as xpScene

    Dim InAnimCtrl as xpAnimController

    Dim OutAnimCtrl as xpAnimController

    Dim FB as Integer

    Dim Layer as Integer

    Dim AnimInName as String

    Dim AnimOutName as String

    Dim B2BAnimInName as String

    Dim B2BAnimOutName as String

    AnimInName = "AnIn"

    AnimOutName = "AnOut"

    B2BAnimInName = "B2BAnIn"

    B2BAnimOutName = "B2BAnOut"

    ' ---------------------------------------------------------------------------

    Self.MoveLayer(OutgoingCG.DefaultFramebufferLayer, 1)

    Self.GetAnimControllerByName(AnimInName, InAnimCtrl)

    InAnimCtrl.Play


    It plays the Animation Controller that I have specified but will not change the layer, tried several different

    variables. Any help would be appreciated.


  • 2.  RE: Script not changing layer of Scene

    Posted 12-15-2013 15:08
    The OutgoingCG variable never has anything assigned to it in the script, so the script will just exit when it hits the MoveLayer line because OutgoingCG is a null variable.

    It looks like you copy pasted that from somewhere but seem to be missing parts of it.

    #XPression


  • 3.  RE: Script not changing layer of Scene

    Posted 12-15-2013 18:05
    Doesn't

    Dim OutgoingCG as xpScene

    Assign the OutgoingCG as the xpScene which is also Self?

    I did take it from another script, still trying to learn!

    #XPression


  • 4.  RE: Script not changing layer of Scene

    Posted 12-15-2013 22:31
    Dim OutgoingCG as xpScene simply declares it as a variable, but nothing is assigned to it yet.

    Normally you would have a call to GetSceneByName to assign a scene to the variable.

    #XPression