I know your name I just need your number

Non-platform specific questions.

I know your name I just need your number

Postby jazz_e_bob » Sat Oct 30, 2004 7:26 pm

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 )
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby jazz_e_bob » Sat Oct 30, 2004 9:26 pm

Once again I answer my own question.

( I worked it out while driving to work this morning... :wink: )
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Sun Oct 31, 2004 10:10 am

May I ask you the same question ? :wink:
( I don't drive so I don't know the answer :oops: )
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Sun Oct 31, 2004 4:46 pm

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.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Mon Nov 01, 2004 1:12 pm

All right
Thanks 8)
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Mon Nov 01, 2004 4:17 pm

Use the getClone function:

Actor *myCreator = getclone("creatorName.0" );
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Mon Nov 01, 2004 7:29 pm

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:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Tue Nov 02, 2004 2:41 am

OK

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

GE Rocks!
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby jazz_e_bob » Mon Nov 08, 2004 5:51 am

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
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Mon Nov 08, 2004 4:55 pm

Sure
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest