Sharing a single game property between different objects

Hello,
Is it possible that a game property (that is, so far I understand, linked to an object) can be accessed by another object ?
I thought that by creating a game property “on the Scene”, as all objects are children of this scene, they could access this property.
But it seems that it is not possible to create such a property, you always have to select an object before creating such a game property.
(so far I only use logic bricks, no Python script).
(hope my question makes sense ?)

Use copy property actuator to do that.Go to the websight Tutorials for Blender 3D and the Blender 3D Game Engine and learn about them.

Why using a property and not a global ?
bge.var = value

Your question males sense.

I think you have some misconceptional views at the BGE. A property is part of a game object (it is an attribute of the concrete object).
It seems you want a communication between objects. You can do that via property actuator in copy mode (static binding). Via messages (dynamic binding) or python. I do not onow what exactly you want to achieve. Just now it looks like you need some Python code.

You can also communicate with all objects and their properties from one global script. Something like:

import bge
object1 = bge.logic.getCurrentScene().objects[‘object1’]
object2 = bge.logic.getCurrentScene().objects[‘object2’]
object1[‘property1’] = False
object2[‘property1’] = True

Attachments

globalScript.blend (90.3 KB)

The problem with any logic you write if all ANY objects share data, is what do you do if 2 change in the same frame?

To keep multiple sound loops synchronized you have to trigger them from a global property. Sometimes you need to have sounds playing in sync. Most of the sound loops get out of sync after a while.

Thanks to everybody for help.
I know now how to solve my problem.