Einlander Posted January 2, 2016 Share Posted January 2, 2016 How would one go about getting the name of a model as displayed in the editor. Is there a command or would I need to put scripts on every limb? Quote Link to comment Share on other sites More sharing options...
macklebee Posted January 2, 2016 Share Posted January 2, 2016 Entity:GetKeyValue("name") should work. The question on where to perform this at depends on what you are trying to do. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Einlander Posted January 2, 2016 Author Share Posted January 2, 2016 Thanks, it seems to work. The goal is to build a house with sub models: Roof, building, steps. I will create a prefab that a script will be attached to. This script will choose a color from a pre-specified list. It will then look for all the children, check their surfaces and get materials. If the materials match a pre-made list of black and white textures it will change the color of that material and reapply it to the mesh. This will happen in onstart. The result will be houses that have different colors every time you load the level. Also each house that is put in the level will have a different color. This will break up the monotony of having the same house in close vicinity. 2 Quote Link to comment Share on other sites More sharing options...
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.