0
$\begingroup$

Image

First time I use the expression controllers. The near sensor works, I tested it. The keyboard sensor is just triggered by E. So since none of the actuators work I guess the mistake is in the expression controllers. Any idea where the mistake is?

Edit: Fixed the expressions. But it still does not work as I intented to used it. It activates the actuator with the true pulse from near sensor or e sensor only. So can I add something to the expression to make it activated by the combination of both the 2 sensors?

p.s. duplicate thread me on blenderartists

$\endgroup$
0
$\begingroup$

if is not part of the expression language.

You can use cor_exhibit_door == stol_exhibit_door or cor_exhibit_door = stol_exhibit_door

$\endgroup$
  • $\begingroup$ Why does it work with "if" though? I just saw your comment on BA too. It does not pop an error. $\endgroup$ – Lev Oct 26 '15 at 9:34
  • 1
    $\begingroup$ I did some more test: the "if" statement is part of the expression language. It will result in error when missing further parameters. At the moment it is not clear to me what purpose it has. - As stated above it is not needed. $\endgroup$ – Monster Oct 26 '15 at 12:25
  • $\begingroup$ Yup I agree with this. I've used both ways, both look good. $\endgroup$ – Lev Oct 26 '15 at 14:08
0
$\begingroup$

Corrected by user "HG1" in blenderartists. In the BA thread you can see the answer and a .blend file shared. In short:

  1. Your expression is wrong "if ((cor_exhibit_door == stol_exhibit_door), True, False)" or "cor_exhibit_door == stol_exhibit_door".
  2. If you only want to activate the expression if are bot sensors active then you can add the names of the sensors to the expression. "if (Near AND E AND (cor_exhibit_door == stol_exhibit_door), True, False)" or "Near AND E AND (cor_exhibit_door == stol_exhibit_door)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.