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

The Archive Base Latest Questions

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

I am using Cocos2D 2.0 and my issue at the moment is scheduling a

  • 0

I am using Cocos2D 2.0 and my issue at the moment is scheduling a method a certain amount of times per second.

Pretty much what I am basically trying to do is:

1. If score is 10 or less, call the method 5 times a second
2. If score is 11 or more, call the method 10 times a second

So for the interval, I have tried doing 1/5 or 1/10 respectively and it hasn’t worked. Is there a certain way I should be doing this using this call?

[self schedule:@selector() interval:];

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:48:49+00:00Added an answer on June 13, 2026 at 1:48 am

    Yes, schedule:interval: will do the trick. Problem here is that 1/10 and 1/5 are fractions defined with two integer literals, so by C convention the integer division is applied and result is 0.

    Try with [self schedule:@selector(yourMethod) interval:1.0/10] and it should work.

    It’s useful to note that schedule: method automatically updates the interval if you reschedule the same selector, you don’t need to unschedule it before.

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

Sidebar

Related Questions

I'm using Cocos2d-x and trying to detect touches in my HelloWorld project. Though I'm
I'm trying to setup an application on Windows 7 using Cocos2D-x. I followed this
I'm using Cocos2D, and I need to access a parent method in a UIView
When am using build and analyse method the following error occurs:- /Users/ghost/demo/libs/cocos2d/CCSprite.m:476:2 Assigned value
After using 'cocos2d-iphone' in one of my projects, I am trying to decide which
I am trying to develop a iphone app by using cocos2d. I create a
Im making an app for the iphone using cocos2d and i am trying to
Using Cocos2d to draw a thicker circle: glLineWidth(20); ccDrawCircle(self.ripplePosition, _radius, 0, 50, NO); But
So i'm using Cocos2d and i keep getting the error Cocos2d: cocos2d: CCFileUtils: Warning
I'm using Cocos2D 1.0.1, and it doesn't get the latest Box2d. So, I would

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.