Hey everyone,
I am trying to get abit of code working that lines up my dead sprites off screen in a row to a certain number then resets and starts from the begining again, i came up with this bit of code but i am very new to programming and can't see why it fails.
-(void) updateBullets {
int i;
for(Bullet *b in bulletarray)
{
if(b.position.y > 500)
{
for (; i < 60; i++)
{
[b stopAllActions];
b.position = cpv(-42*i,-50);
[b setCanFire: YES];
if(i = 60)
{
i = 0;
}
break;
}
break;
}
}
}
it is set off during the program step, i just want it to add another number to 'i' each step then reset to 0 when it gets to 60.
As it is it just drops all the sprites in one spot still.
I feel like such a noob cause this seems like such a simple problem.
Any suggestions would be appreciated.