getclone2 issue

Non-platform specific questions.

getclone2 issue

Postby phyzix5761 » Thu Jun 14, 2012 8:55 pm

I am trying to use getclone2 to get a specific clone and use that clone in a changeAnimation() function. The problem is that it doesn't work. For some reason it's not reading the clone.

This is an example of my code:

Code: Select all
Actor *star0 = getclone2("starTally", 0);

ChangeAnimation("star0", "showCase", NO_CHANGE);



phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: getclone2 issue

Postby skydereign » Thu Jun 14, 2012 9:22 pm

That's because you aren't using the variable at all. You are trying to change the animation of "star0". That means it changes the actor star0's animation. What you want is the clonename.
Code: Select all
ChangeAnimation(star0->clonename, "showCase", NO_CHANGE);
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: getclone2 issue

Postby phyzix5761 » Fri Jun 15, 2012 1:17 am

Thank you Sky. That worked!
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest