sprintf problem

Game Editor comments and discussion.

sprintf problem

Postby Agusstosus15 » Sat Oct 29, 2011 1:24 am

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?
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score

Re: sprintf problem

Postby skydereign » Sat Oct 29, 2011 1:29 am

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: sprintf problem

Postby Agusstosus15 » Wed Nov 02, 2011 6:47 pm

ok everything ok
sorry for my absence and no reply I couldn't be here :)
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest