Graphics

 View Only
  • 1.  Xpression GetMaterial Help

    Posted 07-30-2014 17:57
    I'm trying to write a script that can read a quad's material and do different things depending on what it is...

    Dim Quad1 as xpBaseObject

    Dim Text1 as xpTextObject

    Self.GetObjectByName("Quad1", Quad1)

    Self.GetObjectByName("Text1", Text1)

    If Quad1.GetMaterialName(0, "RED") = true then

    Text1.text = "Red"

    End if

    I know I'm doing something wrong here but have no clue what...


  • 2.  RE: Xpression GetMaterial Help

    Posted 07-30-2014 18:57
    Dim Quad1 as xpBaseObject

    Dim Text1 as xpTextObject

    Self.GetObjectByName("Quad1"³, Quad1)

    Self.GetObjectByName("Text1"³, Text1)

    Dim MyMat as xpMaterial

    Quad1.GetMaterial(0,MyMat)

    if MyMat.Name = "RED" Then

    Text1.text = "Red"

    End if


    #XPression