1
$\begingroup$

Is there any way to get to the body of a message using just logic bricks?
It is possible to set the body using the Message actuator; yet I see no way to access the body when using the Message sensor.

I know you can get to it using python, and it is quite useful, but is there any way to get that same data using the logic bricks?

$\endgroup$
2
  • $\begingroup$ I've never tried it, but I suspect that, in the undocumentedness of the expression controller, there exists a method to read it. But you sound familiar with python, so why not just use that? $\endgroup$
    – sdfgeoff
    Jun 5, 2016 at 21:39
  • $\begingroup$ Accessing the body of the message is specific to python. $\endgroup$ Jun 6, 2016 at 1:15

1 Answer 1

2
$\begingroup$

No, there is no way.

The reason is simple: what should happen when there are two or more messages?

There are way too much options to process a body (and several bodies). The information you could get is if an message with a certain content was received. The filter by subject already does that.

I agree the API looks inconsistent, as you can set a body without any use (without using Python). I see it as simplification, when you have a lot of simple message senders, but just a few (more complex) listeners. I usually use the body when I have more information than the pure existence of a message (subject) can express.

$\endgroup$
1
  • $\begingroup$ such as sending the value of a property to an object in another scene... $\endgroup$ Jun 8, 2016 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .