Simple BGE Messages not passing

Hi,

I am trying to set up a simple method of an object colliding with another object and sending a message to the main GAME object. The GAME object then adds one to the score. Attached is an example file, but the low-down is that the score is not incrementing.

Either because:
A) the message is not being sent
B) the message is not being received
C) the score is not incremented correctly.

Any help is appreciated!
Blender Test FIle: test.blend (485 KB)

GAME object?

I guess you mean “hit counter” That would make more sense.

Regarding your problem:
It is pretty easy to discover which situation ( A) B or C) ) you have.
A) simply activate an property actuator together with the message actuator. So you see if the actuators are activated at all
B) pretty unlikely as your message sensor senses for all messages
C) Trigger you logic with a keyboard sensor rather than the message sensor to test the controller/actuator pair.

Remarks:

  • Avoid sending messages to a specific object. Better use a specific subject. This way any object can listen to the message.
  • Avoid receiving messages without subject filter without a good reason (or without filter in Python code)
  • You can read about messages in the BGE Guide to Messages. You can find it in my signature (Link to Guides)
  • Statics do not sense collision with other statics
  • Game Objects in an inactive layer are inactive too. Inactive game objects do nothing.

I hope it helps

That’s a massive help, thank you!