Okay solved that problem. I didnot want to open another thread so im just going to go off of this one but i have to questions
1. my scoring system dosnt hold the score. like if i hit an apple i have this code
if(dbSpriteCollision(2,4)) //apple
{
dbDeleteSprite(4);
score += 1;
}
it just goes back to there because i am not colliding with the apple anymore so how can i make it so it just keeps adding it.
2. its my for loop i wont lets say 5 apples on the screen would i go somthing like this
for ( a = 100; a < 105; a++)
{
dbSprite(a,dbRnd(640),dbRnd(-1500),4);
}
these are the three things in need help with if some one could help me that would be great.
Here is my complete scroing system
char text[12];
int score = 0;
if(dbSpriteCollision(2,4)) //apple
{
dbDeleteSprite(4);
score += 1;
}
sprintf(text, "Score: %i", score);
dbText(10, 10, text);
Edit: i Have got the score to work fine now so i dont need help on that!