GetChild

Blitz3D Forums/Blitz3D Programming/GetChild

Jerome Squalor(Posted 2007) [#1]
i have this mesh that i built in a modeler. It is composed of a sphere and a cube, which are separate meshes in the modeler. is GetChild supposed to get me one of those meshes?


Gabriel(Posted 2007) [#2]
If you provide the correct (case sensitive) name, FindChild will do this. GetChild will work, yes, but you may have to search recursively as items can be parented to items, which can be parented to other items.. etc..


jfk EO-11110(Posted 2007) [#3]
Both will only work when you load the mesh with LoadAnimMesh, instead of LoadMesh.


John Blackledge(Posted 2007) [#4]
Also some modellers don't export the child name you specified, just something like 'mesh1', 'mesh2'.
Daft, but there it is.


Jerome Squalor(Posted 2007) [#5]
does milkshape export the filename?


John Blackledge(Posted 2007) [#6]
Don't you mean the Child names?
Yes, it does.


Jerome Squalor(Posted 2007) [#7]
yeah thats what i meant...typo


cash(Posted 2007) [#8]
If you use milkshape then you must create joints and use the jointname with loadanimmesh.

you dont have to animate your mesh but you must assign the mesh to the joint.

It is case sensitive and you must put the jointname in quotes in blitz.

Global square1=FindChild(man,"thesquare")

where thesquare is the name of the joint in milkshape.

this is easy, however if you want to use getchild then you have to do a recursive check.