2
$\begingroup$

For example, let's think about a scene where there are two objects: "Door", and "Button". "Door" has an animation which makes it transform and "open" itself. Now, is there a way to program "Button" in such a way that if it collides with a particular material (for example, the skin of the player), it triggers a "Collision" sensor, and a controller attached to the "Collision" sensor activates an actuator in the "Door" object that makes it play the animation?

I hope the situation mentioned above is clear. Thanks.

$\endgroup$

1 Answer 1

2
$\begingroup$

Add a collision sensor in the button. There are 2 options there:

  • collision with the material of the player and
  • collision with a property that you can add to a player.

Then add an action actuator to the door. Remember that you should add the animation actuator to the object that is gonna get animated.

At last, connect them by dragging the "noodle" from the end of the sensor of object 1 to the start of the actuator of object 2. Remember to have them both selected so you can see both their SCAs.

In case those 2 can't be connected add manually a controller "And" and drag the noodle from the sensor to the start of the controller, and then drag the noodle from the end of the "And: controller to the start of the actuator.

$\endgroup$
2
  • $\begingroup$ I had tried the same before, but the "noodle" wasn't connecting the sensor and actuator. Manually making a controller and connecting the sensor to the controller and then connecting the controller to the actuator was what worked for me. Thank you for the help. $\endgroup$
    – Doroiju
    Commented Aug 18, 2015 at 15:41
  • $\begingroup$ In general you can't connect sensors with actuators. You can connect them to controllers which are always in between. ----There is a little helper in the Blender GUI that automatically adds a controller of the last added type when you try to connect sensors and actuators. This will fail if the bricks belong to different objects, as Blender can't decide what object should own the controller. $\endgroup$
    – Monster
    Commented Aug 25, 2015 at 4:58

You must log in to answer this question.

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