Play animation when player is in cube

Title says all.
I would like to play a animation if i press f but ONLY when the player is in an inviusible cube.
Sorry for my bad english.

Can nobody hlp me :/?

  1. Make your cube static, invisible and ghost.
  2. Add a property to the cube (name eg. collision)
  3. Add a collision sensor to you player. Under property give in the property name (collision) from the property the cube
    5.Connect the collision sensor to an and controller.
  4. Connect you keyboard sensor (f key) to the same and controller.
  5. Connect the and controller to the animation actuator.

Okay i will try this, thankz.