I have code which plays a spritesheet animation one time.
When it is finished playing, I would like it to loop the last 20 frames, but skip the first 20.
I tried to add an event listener onto the spriteInstance like this:
mySpriteInstance:addEventListener(“sprite”, spriteEvent)
–FYI this instance is inside of another event listener
so that when the event phase is == end, I could do something like this:
sprite.add(sameSpriteSet, “EndLoop”, 11,31,20,0)
The problem is that when I add the event listener, I get the error below (caused when it reaches the addEventListener line)
Runtime error
assertion failed!
stack traceback:
[C]: ?
[C]: in function ‘assert’
?: in function ‘getOrCreateTable’
?: in function ‘addEventListener’
…ocuments/main.lua:110: in function <…ocuments studio workspace>
?: in function <?:214>
Is there a better way to do this? [import]uid: 4438 topic_id: 4140 reply_id: 304140[/import] </…ocuments>