Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:05:08+00:00 2026-06-13T01:05:08+00:00

In Cocos2D 2.x, I am doing runAction to do some animations in my game.

  • 0

In Cocos2D 2.x, I am doing runAction to do some animations in my game. It is working great but I want the animation to repeat a certain number of times.

So pretty much my pseudo-code is this:

CCSequence... action1, action2
[sprite runAction:theSequence];

So I just want to repeat the action for (lets say 3 times), how would I do this? I do not see any API to do this but maybe I am just not seeing something. If anyone knows how to do this and could share the information that would be great!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:05:10+00:00Added an answer on June 13, 2026 at 1:05 am

    You can use CCRepeat to repeat an action a number of times:

    id repeatAction = [CCRepeat actionWithAction:theSequence times:3];
    [sprite runAction:repeatAction];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently learning cocos2D-x and am doing some sprite animation. My Objective is
My cocos2d iOS game code compiles and runs without error in Xcode 4.2.1 but
How to catapult animation in cocos2d. Iam doing animation of streching stick like rubber,
I am doing a game with cocos2d and using chipmunk to manage the physics.
I am doing some r &d in cocos2d.I have one backgroundLayer and add one
I have recently upgraded to Cocos2d 2.0 Before that my game was working properly
I'm doing some porting from Qt Cocos2d to iOS cocos2d, am using Objective-C++ as
I want to study Cocos2d, seems it's a good framework for iPhone game programming.
I'm working on a Cocos2D and Box2D game. I just created a class for
I am doing iOS game development using the cocos2d framework, and I tremendously envy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.