- Fixed a bug with action points, where the angle returned wouldn't compensate for flipped or mirrored entities
- Fixed bugs that prevented sub-entities from displaying or animating properly
The process to import sub-entities is actually quite painless, but may look a little daunting at first:
For this example, we have an entity called 'TestEntity' that is using 'Player' as a sub-entity in the 'test' animation.
Here is the initially imported scml object
The first step after you've imported your project is to clone the scml object type, and rename it to something that makes sense (usually the name of the entity in Spriter). If you have multiple sub-entities or entities. You need a separate object for everything that will be a sub-entity. The initial import was already called 'Player', so I'm naming this one 'TestEntity'. This is also a good time to set your scml object to it's starting entity in the object properties.
These were the initialization events automatically generated by the import:
The first thing you do is create an initialization event for your other scml object. Then move all of the actions initializing objects that belong to that entity to this new initialization event. It's easy to tell which ones belong to the other entity because each object is prepended with the filename and the entity name. After you've moved over all of the actions. Select all the actions, right click 'Replace Object', and change the object from the original scml object to the correct one.
And the final step is to look at the name of the sub-entity object in Spriter (by default it's named after the entity being used as a sub-entity)
And create your own 'Associate object type' action for the object that will be the sub-entity to the containing entity, using the same naming convention:
And that's it. When you play your project the sub-entity should be playing, and you can even control your sub-entity in real time using the new override actions.
Please let me know if you have any trouble following the instructions.