diddykonga Posted May 22, 2016 Report Share Posted May 22, 2016 So i just recently got some of the Art Packs, and Spriter Pro, when i exported the SCON of the BasicPlatformerPack's Platformer character, i noticed that inside the Mainline Key's there Ref's all have parent ID's that reference an Object in the Object Info data. So i have two questions. Why dont Ref's store the Parent as a Timeline ID like the Timeline is stored inside the Ref? I noticed if you set the custom save option to export out Sprites in the Object Info data, then the Parent ID inside the Ref's no longer points to the correct Object Info ID, but instead would usually point you to another Sprite instead of a Bone, is this intended? Quote Link to comment Share on other sites More sharing options...
lucid Posted May 23, 2016 Report Share Posted May 23, 2016 1. The idea was that you build the hierarchy from the bonerefs into a flat resizeable array, and then you refer to the information in this array by index. For instance: <bone_ref id="0" timeline="15" key="2"/> <bone_ref id="1" parent="0" timeline="16" key="2"/> <object_ref id="0" parent="0" timeline="2" key="2" z_index="0"/> <object_ref id="1" parent="1" timeline="3" key="2" z_index="1"/> You would proceed in order, and push the results of the first tweening operation (boneref id=0) into the first index index of the array. Let's call it transformedArray. Since there is no parent, you would transform it using the transform information of the entire game object (the character's x,y,angle, etc in the game world) as it's parent. Then when you calculate the second boneref (id=1), the parent is 0, so you would transform the result of it's tweening using the information from transformedArray[0]. And you would store the transformed result in the next index - and so on. 2. As above, the parent should always refer to the index within your 'transformedArray' Please let me know if this answers your question. Quote Link to comment Share on other sites More sharing options...
diddykonga Posted June 5, 2016 Author Report Share Posted June 5, 2016 Oh ok, this makes much more sense, thanks for the information! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.