Page 1 of 1

How to save x and y positions by clone Actors?

PostPosted: Sat Apr 29, 2006 5:04 pm
by regine
I need to save the x and y postions by Clone Actors. There is my script:

x = testingActor.0.x;
y = testingActor.0.y;
saveVars("save", "sav");

What is false?

PostPosted: Sat Apr 29, 2006 9:44 pm
by DilloDude
To access variables of clone actors, you need to use the getclone function:
Code: Select all
x = getclone(testingActor.0)->x;
y = getclone(testingActor.0)->y;
saveVars("save", "sav");

PostPosted: Sun Apr 30, 2006 9:33 am
by regine
No, i get the the error:

Incompatble types: cannot convert from 'struct' to '* char'

PostPosted: Sun Apr 30, 2006 10:11 am
by DilloDude
Did you remember to use quotes?:
Code: Select all
getclone("testingActor.0")->x;

Sorry, I forgot them before.

PostPosted: Sun Apr 30, 2006 11:55 am
by regine
Now, the function is OK.

Thanks!

Now, how i have this problem:

How to load the for clones saved postions to the self clone?