Sibling Textures

Blitz3D Forums/Blitz3D Beginners Area/Sibling Textures

Zenn Lee(Posted 2007) [#1]
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.


Gabriel(Posted 2007) [#2]
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. )


Zenn Lee(Posted 2007) [#3]
Thanks a lot Gabriel, that is what I was looking for.


Zenn Lee(Posted 2007) [#4]
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


Gabriel(Posted 2007) [#5]
You'll need to use LoadAnimMesh() instead of LoadMesh() to keep a hierarchy intact.


Zenn Lee(Posted 2007) [#6]
Ok, thanks, let me try it again:)