Odd, it seemed to work well in our tests...
Anyway, this is what I came up with out of nowhere:
But, it fails at the first line, saying entity does not exist...when in fact I have passed the two entities to the function. Both are loaded as animated meshes to preserve the bones. Seems simple enough, but I get the feeling I'm missing something...
Anyway, this is what I came up with out of nowhere:
Function AttachMesh(MeshToAttach,Mesh) For Children = 1 To CountChildren(MeshToAttach) Child = GetChild(MeshToAttach,Children) For OtherChildren = 1 To CountChildren(Mesh) OtherChild = GetChild(Mesh,OtherChildren) If EntityName(Child) = EntityName(OtherChild) Then EntityParent(Child,OtherChild) Exit EndIf Next Next End Function
But, it fails at the first line, saying entity does not exist...when in fact I have passed the two entities to the function. Both are loaded as animated meshes to preserve the bones. Seems simple enough, but I get the feeling I'm missing something...