This isn't a cocos2d specific question, but I'd like to know, anyway.
I would like to great a new sprite through this code.
if (count < max) {
count++;
sprite = [CCSprite spriteWithFile: @"tail.png"];
sprite.position = ccp( 100, 500 );
[self addChild:sprite;
}
max and count are integers
How can I have a new sprite created with the "count" integer appended on the hackTail sprite? Like every time this code was run, it would creating sprites like "sprite1", "sprite2", and so on. And also, how would I be able to check if sprite1 and sprite2 existed and use have them run actions. I guess the main question is: how do I put another value into the name of a to-be-newly-created value?
Thanks.