Getting property from other object

(Cognis) #1

I have two objects, A and B. How do I make A ‘read’ a property that B has? Without using a message, that is…

0 Likes

(black reaper) #2

You can use copy proprety actuator with the logic brick ?

0 Likes

(S_Cross) #3

There’s an actuator with a ‘copy property’ or something like that.

EDIT: Sorry, I didn’t see black reapers post. Too late now, I can’t delete it.

0 Likes

(Cognis) #4

Cool, thanks (both of you, hehe)!

0 Likes

(roggo) #5

How do you do the same with Python, without making logic bricks: ie. there is lots of info from different parts going to different parts and would get messy with logic bricks? :slight_smile:

Especially with sensors, example:

Move A if B senses something.

0 Likes

(Cognis) #6

Well, if you do not want to use the Message function, you can let the actuator in B change a property in B, and have an Always ‘sensor’ in A keep a constantly copied property. When B senses something, its property changes, and A copies that property. Then simply have the movement of A be activated by the change in A’s copy of the property!

I love playing with this new copying toy… hehehe

0 Likes

(roggo) #7

Could you post a simple example? =)

It all the time says “not defined”…

0 Likes

(Matt_Goles) #8

You can use copy proprety actuator with the logic brick ?

Just for anyone who is using this. if you make a full copy of a scene and you use a copy property brick, in your new scene be sure to change the OB name to the new objects name. ex. Plane --> Plane.001

This has caused me many problems.

0 Likes

(Cognis) #9

Of course, here! Use left / right arrows to get one cube close to the other, and see how the THIRD cube starts to spin :slight_smile:

0 Likes