Where are my children!?

Blitz3D Forums/Blitz3D Programming/Where are my children!?

vibe37(Posted 2004) [#1]
Sorry for the exciting title, as this isn't exciting at all ;)
I loaded the model of an gun I made in good ol' Milkshape into B3D and I can't find any child with FindChild and CountChildren even returns 0! How is this possible - the damn thing has got plenty of children in MS3d!?

Regards,
Kungfista


GfK(Posted 2004) [#2]
What format did you save it in?

Also, FindChild is case-sensitive. For that reason, its best to name children in all upper case or all lower case - not a combination of the two.


vibe37(Posted 2004) [#3]
I know about the case thingy and the format is B3D. I didn't encounter any problems finding childs in B3D models so far... at least I had no problem finding the "right wrist" bone of the B3D-guy who holds the gun. As you might guess I'm trying to get the muzzle of the gun now ;)


GfK(Posted 2004) [#4]
Right - try doing a FindChild on the "right wrist" instead of the character. The thing is, the muzzle is not a child of the character mesh, it will be a child of the gun (depending how the model is constructed of course).

Entity hierarchy can get confusing. There's probably a recursive "FindChild" function in the code archives somewhere. I think MasterBeaker did one called "NextChild" or something...


fredborg(Posted 2004) [#5]
Are you sure you are using LoadAnimMesh, and not LoadMesh?


GfK(Posted 2004) [#6]
Are you sure you are using LoadAnimMesh, and not LoadMesh?
He did say he had no trouble finding the wrists?

Anyway, try this.


Ross C(Posted 2004) [#7]
MilkShape doesn't keep Child names or group names. I think they all end up being called "root". It's a pain...It keeps the heirarchy, but not the names.

If you have ultimate unwrap, you can edit the names in that.


fredborg(Posted 2004) [#8]
He did say he had no trouble finding the wrists?
I was assuming that was another model altogether, since he was talking about loading a gun model (which returned 0 for CountChildren)...


vibe37(Posted 2004) [#9]
I'm stupid!
ROFL, you're right Fredborg, I searched the gun for bones but didn't load it as an AnimMesh - thanks :)
Another question: Is there another way to get a Milkshape group as a child entity in Blitz than using Ultimate Unwrap to rename the groups?

Thx for your help!
Kungfista