[SOLVED] Sprite runAction repeatForever not working on compiled JS game

Hi, I’ve got a sprite with a repeating forever action working just fine in Cocos2d-JS v3.6 in the browser, like this:

mySprite.runAction(
      cc.sequence(
        cc.rotateTo(5, -90),
        cc.rotateTo(5, 90)
      )
    ).repeatForever();

This works alright in the browser, but when running for windows (either release or debug) on Cocos Code IDE or compiling with cocos compile -p win32 -m release the sprite only animates once and never repeats.

I’m not getting any output in the console. Any clues?

I believe it should be

mySprite.runAction(
      cc.sequence(
        cc.rotateTo(5, -90),
        cc.rotateTo(5, 90)
      ).repeatForever()
    );

However, I don’t know why it worked on web

1 Like

Yep!

That was it, thanks!

Now… If only I could solve this too, I’d be a little closer to making it to the windows contest :stuck_out_tongue: