1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

P3D v4 Diffuse textures and lua script

Discussion in 'Prepar3D' started by Peter Hornfeck, 14 Nov 2017.

  1. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Hello,

    maybe someone knows what I'm doing wrong.

    I made a house with a roof. For the roof I used one texture, for example roof.dds. A second texture roof_snow.dds I tried to use for winter.

    Then I add the lua script name to the material in MCX. Roof.lua

    Because Instant Scenery couldn't use P3D models, I export as a bgl file with MCX and P3D V4 setting.
    The bgl is shown in P3D, but there are no roof, only black faces for the roof.

    Whats the correct entry for the lua script in MCX? Roof or Roof.lua. I used Roof.lua
    And need I first an addon xml file to let P3D know, I use scripts?

    First I tried "If ... end" in the lua script, later I reduced it only to

    !lua
    local month = varget("E:ZULU MONTH OF YEAR", "Number")
    varset("T:DiffuseTexture","String","Roofs_Snow.dds")


    Thanks for any help