General > Developers Corner

Need help changing the skybox texture

(1/1)

Jeff43:
Has nothing to do with ulx, so I thought maybe off-topic was the way to go. I tried Facepunch, but no one seems to know a solution.

--- Code: ---Material("painted"):SetTexture("$basetexture","sky_day01_09") -- also tried skybox/sky_day01_09
--- End code ---

MrPresident:
"painted" isn't the material.

There are individual materials for the skybox.

 "up", "dn", "lf", "rt", "bk", "ft"

For example:

lua_run_cl print(Material("painted"))
Material [___error]


But...

lua_run_cl print(Material("skybox/paintedup"))
Material [skybox/paintedup]

so you would need..

Material("skybox/paintedup")
Material("skybox/painteddn")
Material("skybox/paintedlf")
Material("skybox/paintedrt")
Material("skybox/paintedbk")
Material("skybox/paintedft")

Not sure if the rest of your code will work as I didn't try it.. but that should help you get started.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version