Sibling Textures
Blitz3D Forums/Blitz3D Beginners Area/Sibling Textures
| ||
Hi, I'm pretty new to B3D so if you guys could please give me a hand... I just made a model that consists of ----------------------- >Body (parent) >>Head (Head Texture) (child) >>Torso (Torso Texture)(child) >>Limbs (Limbs Texture)(child) >>Feet (Feet Texture) (child) ------------------------ Each part of my character has a texture applied to it. How would I go about selecting one of the siblings and changing the texture. Thanks a lot for all the help, hopefully this is a simple question. |
| ||
You would normally use FindChild() and pass it the name of the "part" you're looking for. You can also use CountChildren() and GetChild() to recurse through the whole hierarchy, but FindChild() is much easier if you know the name of the piece you want ( and it sounds like you do. ) |
| ||
Thanks a lot Gabriel, that is what I was looking for. |
| ||
Well, I might need a little more help, can I have an example? This is what I thought you meant, but it doesn't seem to work. Global Character=LoadMesh("Character.x") Global Character_02 = LoadTexture("Character_02.jpg") PaintEntity FindChild(Character,"Torso"),Character_02 |
| ||
You'll need to use LoadAnimMesh() instead of LoadMesh() to keep a hierarchy intact. |
| ||
Ok, thanks, let me try it again:) |