Page 1 of 1

I know your name I just need your number

PostPosted: Sat Oct 30, 2004 7:26 pm
by jazz_e_bob
I have an actors name stored in a string "creatorName".

How can I use this to read parameters from that actor?

( eg x, y, angle etc )

PostPosted: Sat Oct 30, 2004 9:26 pm
by jazz_e_bob
Once again I answer my own question.

( I worked it out while driving to work this morning... :wink: )

PostPosted: Sun Oct 31, 2004 10:10 am
by ingsan
May I ask you the same question ? :wink:
( I don't drive so I don't know the answer :oops: )

PostPosted: Sun Oct 31, 2004 4:46 pm
by jazz_e_bob
OK

The answer is "you can't"

but

what you CAN do is make a local variable for each creator property you need.

then

when an actor creates another actor it temporarily stores its properties globally.

On create actor, the child actor reads its parents info from the global store.

Its a little messy but it works.

PostPosted: Mon Nov 01, 2004 1:12 pm
by ingsan
All right
Thanks 8)

PostPosted: Mon Nov 01, 2004 4:17 pm
by makslane
Use the getClone function:

Actor *myCreator = getclone("creatorName.0" );

PostPosted: Mon Nov 01, 2004 7:29 pm
by ingsan
when an actor creates another actor it temporarily stores its properties globally


Jazz, what you want is just " create " another actor. Is he a clone of your former actor ? Then I can understand Maxslane's code. If not, then I don't :cry:

PostPosted: Tue Nov 02, 2004 2:41 am
by jazz_e_bob
OK

Thanks for the feedback guys. Ingsan, I will post a demo soon to show what I am trying to achieve here... :)

GE Rocks!

PostPosted: Mon Nov 08, 2004 5:51 am
by jazz_e_bob
makslane wrote:Use the getClone function:

Actor *myCreator = getclone("creatorName.0" );


So now I can use:

Actor *myEnemy = getclone("enemyName.0" );
enemyX = myEnemy->x;
enemyY = myEnemy->y;

???

Image

PostPosted: Mon Nov 08, 2004 4:55 pm
by makslane
Sure