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

  • Home
  • SEARCH
  • 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 8726365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:13:50+00:00 2026-06-13T08:13:50+00:00

I created a CCAnimation as seen below. I tried lowering the delay to something

  • 0

I created a CCAnimation as seen below. I tried lowering the delay to something below .05f and the animation now fails to complete! Its only 8 frames. I don’t know if I am doing something wrong. At first I thought it was a memory leak and I was losing the action, so I assigned it to a strong property to test that, and still did it. I’m not sure how the delay could cause my animation to fail to finish. I am running in the simulator at 60 frames per sec.

Using Kobold 2.0.4

Can anyone help?

else if([model currentState] == PROCESSING_FIRST_ACTION)
        {
            CCDirector* director = [CCDirector sharedDirector];    // process model
            //Get the top left corner of the screen
            int screen_height = director.screenSizeAsPoint.y;
            int screen_width = director.screenSizeAsPoint.x;

            id attacker = [model attacker];
            id attackChoice = [attacker getRegisteredAttack];

            CCAction* attack = [model.resourceManager animation: @"simple-attack-frame"];
            CCSprite * attackSprite = [model.resourceManager sprite: @"simple-attack-frame-01"];

            attackSprite.position = ccp(screen_width - rxa(80), screen_height - rya(80));
            attackSprite.tag = 5;
            self.action = attack;

            CCNode * check = [self getChildByTag:5];

            if(check == nil)
            {
                [self addChild: attackSprite];
                [attackSprite runAction:attack];
            }
        }

resource manager:

-(id)animation: (NSString*)_resource
{
    NSMutableArray *frames = [NSMutableArray array];

    for(int i = 1; i <= 8; ++i)
    {
        [frames addObject:
         [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
          [NSString stringWithFormat:@"%@-0%d", _resource, i]]];
    }

    CCAnimation *animation = [CCAnimation animationWithSpriteFrames: frames delay:1/60];

    CCAction * action = [CCAnimate actionWithAnimation: animation];

    return action;

}
  • 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-13T08:13:51+00:00Added an answer on June 13, 2026 at 8:13 am

    After digging around on the web I found a solution. I’m not the one who submitted this solution but I can attest that it fixed my problems:

    https://github.com/cocos2d/cocos2d-iphone/commit/60f9cc98783b9a6a5635db4f468f83e0511c74c8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Created a button, now tried to add it to the screen and im getting
I have created an animation like [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile: @Actor.plist]; spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@Actor.pvr.ccz];
Created a button in my aspx file and add its click method in the
I am doing a game, and I got only 1 final problem. Its that
Created javascript widget. Testing on my own domain and its working fine. However when
Created a group of related providers using the provider pattern. Now would like to
I created a simple, 2 frame sprite animation based off a few tutorials that
Created a simple jquery-nivo-like slider using wpf and want to add an animation between
I created one simple demo project, which does the animation using AnimationDrawable class of
Created .NET WCF service, tested it - works. Generated schemas from Data and service

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.