Comparing Properties

I have 2 objects that each have a property. What I want to do is take the value of the property of the other object and compare it to the property of the other object. I have tried a lot of things but I cannot think of any way to do this.
Please Help :frowning:


As there are several objects involved you either need to do that by Python, or you transfer the properties values to a single object.

You could send a message from one to the other.

  • obj1
  • always-expression-actuator you want to activate
  • select obj2 with obj1 selected aswell(shift+click)
  • always-connect it to the expression brick

now the 2 are connected with eachother and if i am right you can do things like:
obj1_property == obj2_property
obj1_property < obj2_property
obj1_property -obj2_property == 2


expressionbrick is like an ifstatement in python.
not tested, but it should work i think.