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 6173195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:31:31+00:00 2026-05-23T23:31:31+00:00

I am creating a iphone game currently using cocos2d. The basics of the game

  • 0

I am creating a iphone game currently using cocos2d. The basics of the game is that I have a cannon, and on pressing a fire button, the cannon fires a certain number of balls into the screen area.

So far, i have the layers setup with the cannon, the fire button, and even the balls. When I click the fire button, the cannon fires all the balls at the same time.

I have setup a for loop to loop through the ball objects in an NSMutableArray. For each one, I create it, add it to the layer, and then give it some motion. In theory, this should give me one ball at a time, however in testing it goes through the code so quickly that all the balls appear at the same time.

What I need help with is the delay between firing consecutive balls i.e. fire a ball, wait 1 second, and fire next ball, so that it shows up on screen and thus the illusion of firing one ball at a time – if that makes sense.

I have tried using the scheduler i.e. (ccTime) dt, but I don’t need the delay to be repeating, if you know what I mean.

Any help is greatly appreciated.

Thanks in advance.
Pras.

  • 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-05-23T23:31:32+00:00Added an answer on May 23, 2026 at 11:31 pm

    fireball is function name

    int ballcount; //.h file
    
    //every 2seconds one ball will be inside ur fireball function check
    
    [self schedule:@selector:(fireBall) interval:2];
    
    
    
     if(ballCount<8)
    {   
        ballcount ++;    
    }    
    else
    {
        [self unschedule: selector(fireBall)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an iPhone game. I want to have a button in my
I am creating a game of questions and answers for iphone using cocos2d, and
We're in the process of creating an iPhone game using cocos2d . We're trying
i am creating a multi player iPhone game using the multi player tutorial as
i'm creating a card game on iphone. My problem is that i want to
Background: I'm developing a game for the iPhone/iPad using cocos2d-iphone. Our engine provides the
I'm trying to add animations to my game (iPhone app, using cocos2d). The game
I'm creating a game in objective C using the cocos 2d engine for iPhone.
I am creating a free version of my iPhone game. I want to have
I am creating an iPhone app that I feel needs to have a receipt

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.