Collision sensor question

I would like to make it so that when mesh “A” collides with mesh “B” (property: player - float - 2) the game would (for e.g.) play a sound. BUT… that would only happen IF mesh “B” is set to “float - 2”, in other case, if it’s “float - 1” (or any other number besides 2) - the sound will NOT be played.

Could this be achieved with logic bricks? Because the collision sensor doesn’t have a space to write what “value” the item needs to be for the command to continue/work.

You can do it with bricks. The simplest way would be for the player object to detect the collision as it could just have a Collision Sensor to detect ‘enemy’ (or whatever it is) with a Property Sensor for ‘player’ with value of 2 and evaluate type of ‘Equal.’ When both are true, play the sound.

If the collision HAS to be detected by object A, you can achieve it with a few Message bricks. When collision occurs, send a message with a Message Actuator to the Player object with a subject such as ‘enemy collision.’ The player object can receive that with a Message Sensor. Connect the Message Sensor and a Property Sensor for ‘player’ with a value of 2 and evaluate type of ‘Equal’ to an And Controller and then on to either a Sound Actuator to play the sound or you could send a message out to your main game control object to play the sound or back to the colliding object and it could play the sound. Just depends on how you want the flow to go.