Graphics

 View Only
  • 1.  Scripting help

    Posted 05-14-2018 03:49

    The script below works just like I wanted it to. This is more of an exercise that will lead to bigger and better things. However instead of objects, I want to be able to turn the visibility of Groups on and off. The operator will ultimately pick (through dashboard) a specific theme for a given game night. We have three different themes. I want to build all three themes into each of the various Scenes in Xpression. The operator will select a theme (gold, city, blue) and it will turn the unneeded elements visibility off. Any help would be appreciated.

    dim city, gold, blue as xpBaseObject

    scene.getObjectByName ("Quad1", city)
    scene.getObjectByName ("Quad2", gold)
    scene.getObjectByName ("Quad3", blue)


    if text = "3" then
    blue.visible = true
    gold.visible = false
    city.visible = false

    else if text = "2" then
    blue.visible = false
    gold.visible = true
    city.visible = false

    else if text = "1" then
    blue.visible = false
    gold.visible = false
    city.visible = true

    end if


  • 2.  RE: Scripting help

    Posted 05-14-2018 10:54
    groups are objects too.

    scene.getObjectByName(...) will work if you set the right name.
    In the example above a group named "Group1" :

    dim obj as xpBaseObject

    scene.getObjectByName ("Group1", obj)

    obj.visible = True

    #XPression


  • 3.  RE: Scripting help

    Posted 05-14-2018 15:47
    BINGO. I knew it was simple. Thanks A.
    #XPression


  • 4.  RE: Scripting help

    Posted 05-22-2018 15:40
    I was trying to use "scene.getSceneGroupByName"
    #XPression