I noticed that C2's save and load function doesn't store Spriter object scale or animation speed.
I think this issue is also a thing with the direction of the object, as I've had objects facing the wrong direction once reloaded.
My solution was to have an instance variable on the object (and all spriter objects are conveniently in a family, so I only need to add it once), and upon loading a save, it overrides the way they are facing based on the direction value.
I imagine you could do something similar for the object scale and animation speed, the only downside being that if there is no variable you can just access and mirror, you have to manually keep track of it.
I suppose it might not be too hard to fix this issue from the source but I kinda don't want to mess with the Spriter plugin in case it's updated again later. There's also Mike's solution, which I didn't really understand when I gave it a quick read, but it probably works.
Anyway, I want to report a bug, but like with most obscure bugs, I don't know exactly what causes it to occur or else I could replicate it in my own CAPX.
In short, sound effects and event triggers in Spriter can activate multiple times in C2 when their easing curve is set to linear (the default)... but, this won't usually happen. It only seems to happen under some obscure scenario that I cannot pin down despite constant testing.
Setting the easing curve to instant seems to fix it, but I can't imagine an event or sound trigger would ever *want* functionality like this, so... yeah. As far as I can tell, the way to cause it is something vaguely like this:
- Play an animation with a sound/event trigger
- Interrupt this animation mid-way (before it is completed) with another animation, or maybe interrupt it with another animation mid-way (the latter seemed to be more consistent with the glitching), not sure
- Play the 1st animation again?
- Interrupt the animation as before, and the sound/event trigger will activate on the first frame or the millisecond after or something like that.
Again, this is just a general idea, I do not know how to actually, consistently reproduce this glitch. Should you want to fix it, you may have to try some random variations, all I could see in common was that animations were either starting mid-way or ending early and that the easing curves for the offending triggers (NOT the keyframes they belong to) were set to linear.
If I have time to play around and figure it out, I will try, but I had to spend a while just trying to figure out how to fix my sound effects seemingly randomly playing 2-4 times, so I'm kind out of time to debug the underlying cause, especially since I don't really understand how easing curves work in C2 for me to guess at why it'd affect the sound/event triggers.
EDIT: Seems I'm actually still occasionally getting the bug, but less than before. Still don't know why. :\