So I’ve been trying to add a feature in my game and I’m apparently having some difficulties. So I have three properties, two integers and one boolean. I attempted to make that if one property greater than the other one…the boolean property would be true.
The obj lines are getting what objects to use, as the names in “” are the actual objects’ names. Then, the obj[“prop”] is getting the property prop in obj. It then adds the two first properties and makes the the result the third property’s value.
Put it in a Python conroller, connect it to a sensor that will trigger it, and you are done.
make a master object, call it ‘property handler’ or something. Put al the properties you need onto that object, connect messages sensors to property actuators like the screen shot above.
now let all objects send a message to the ‘property handler’.
now you have your objects that sends messages to the ‘property handler’, the ‘property handler’ then counts the properties, just like in the screenshot.