How to save x and y positions by clone Actors?

Non-platform specific questions.

How to save x and y positions by clone Actors?

Postby regine » Sat Apr 29, 2006 5:04 pm

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?
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Postby DilloDude » Sat Apr 29, 2006 9:44 pm

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");
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby regine » Sun Apr 30, 2006 9:33 am

No, i get the the error:

Incompatble types: cannot convert from 'struct' to '* char'
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Postby DilloDude » Sun Apr 30, 2006 10:11 am

Did you remember to use quotes?:
Code: Select all
getclone("testingActor.0")->x;

Sorry, I forgot them before.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby regine » Sun Apr 30, 2006 11:55 am

Now, the function is OK.

Thanks!

Now, how i have this problem:

How to load the for clones saved postions to the self clone?
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest