stop auto animate setPosition on ccsprites

EDIT** using cocos2d-x 2.0

i am positioning a bunch of ccsprites in a cclayer

for some reason when i do this it animates them to that location rather than instantly positioning them

i dont want them to animate in ideas on y it is doing this and how to stop it

Can you show your code?

Jeffrey Walraven wrote:

Can you show your code?

EDIT*** using cocos2d-x 2.0
this runs in a ccsprite
@
string start = “bg”;
string end = “.png”;
string fileName;
CCSprite**tempS;

for(int i = 0; i <4; i**)
{
fileName = start* Utils::num2str* end;

tempS = CCSprite::spriteWithFile(fileName.c_str());
tempS~~>setAnchorPoint);
tempS~~>setPosition(ccp(0, tempS->getContentSize().height*(i)));

addChild(tempS);

bg_on.push_back(tempS);

}
@

That is weird, because it doesn’t do that for me. What is “bg_on”? Are you updated to the latest version of cocos2dx 2.0?

Jeffrey Walraven wrote:

That is weird, because it doesn’t do that for me. What is “bg_on”? Are you updated to the latest version of cocos2dx 2.0?

its a vector of CCSprites

well i am currently just putting a delay in before it starts.

thx for all the help jeff…i just figured it out.

i was transition into the game scene with:

pDirector->pushScene(CCTransitionSlideInB::transitionWithDuration(1.0f, Game::create()));

so it was sliding from the top of the level down to the bottom which made it look like it was the backgrounds that were moving. you could say it was like the perspective of the camera was panning down.

it became obvious once i started to add furniture to the page

DOH!