Gandi Posted May 17, 2010 Posted May 17, 2010 It seems like there is a lack of documentation for lua :-/ Im trying to set the texture of a material in the editor. atm i got: local material = self.mesh.material local tex = LoadTexture("abstract::"..value) but i just cant find the command for setting the texture of the material.. another question: I create my mesh with lua (like the road) and i want to be able to select the entity by clicking on the plane. how can i get to that? Quote
AggrorJorn Posted May 17, 2010 Posted May 17, 2010 I know what you mean Gandi. The calss scripting is not that easy to understand for everyone. especially without good docs. What are you exactly trying to do with the texture? You say you want to set a texture on a model, but the code says that you load the texture from the model ? instead of self.mesh use one of these: self self.model self.object object object.model Sometimes one works and sometimes another one. haven't figured it out yet. Quote
Gandi Posted May 17, 2010 Author Posted May 17, 2010 I Got a model and i painted a material to that model (the model is self.mesh) now i want to set the texture0 of that material (SetMaterialTexture() in C) and im sure its self.mesh im just not sure if i get the mesh's material with self.mesh.material and i know there is 1 line of code missing.. thats the line where i set the texture Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.