Page 1 of 1

sprintf problem

PostPosted: Sat Oct 29, 2011 1:24 am
by Agusstosus15
io=getclone(collide.clonename)->cloneindex;
sprintf(on[1],"p_panel.%d",io);
ChangeZDepth(clonename,0.9);
ChangeParent(clonename,on[1]);
MoveTo(clonename,getclone(on[1])->x,getclone(on[1])->y,15,"Game Center","");

instead of colliding actors have different cloneindex my clonename actor land always at one with index 1
why?

Re: sprintf problem

PostPosted: Sat Oct 29, 2011 1:29 am
by skydereign
Why not just use collide.cloneindex? Instead of using getclone? Also, avoid using clonename, since you can use "Event Actor". It's cleaner that way.
Code: Select all
sprintf(on[1],"p_panel.%d",collide.cloneindex);
ChangeZDepth("Event Actor",0.9);
ChangeParent("Event Actor",on[1]);
MoveTo("Event Actor" ,getclone(on[1])->x, getclone(on[1])->y,15,"Game Center","");


But still, what are you trying to do?

Re: sprintf problem

PostPosted: Wed Nov 02, 2011 6:47 pm
by Agusstosus15
ok everything ok
sorry for my absence and no reply I couldn't be here :)