Need help with opening door

I have been making this game, and a part of it is the player can open a gate with a coin. I tried to create using game logic but it doesnt seem to work

These are the sensor and actuator setups for both objects. Invisible object is ment to be an area the player has to be in to open the gate by pressing E He can only do this when he has 1 coin. (adding the coin setup later) so now its supposed to open when the player is in the area and presses E, but it doesnt. All the actuators attached on their own do work (Like when it only has to press E or only has to be in that area) but attached together like in the screenshot it doesnt.

before investigating further … i see that you send the message to the object “TESSSRR” and not the “DOOR” object

also, dont forget that a message is just an instant . Are you expecting to press “E” exactly same frame than when the message comes to DOOR ?

i renamed the TESRR object as door for this screenshot, so thats not the problem :slight_smile:

i tried it with the tap function on on the message sensor, still no result.

i suggest this solution :

SENSOR

  • when collision --> and --> property actuator on a string you create ( ‘locked’ to ‘openable’ )
    DOOR
  • if “E” + Propriety == “openable” -> and -> animation open door

I have recreated an new test, now the key sensor and collision sensor are working together, but now i cant seem to get a third sensor to work, one that says the player has to have one coin.

Again, i have hooked up the one sensor on its own and it works fine when i get a coin

Im sorry, im pretty new to the blender game engine, im not sure how to do your solution

Messages are used to instant pulse , they dont remain true (as far as i remember) Proprieties are the things which remain

you can upload your file. I will do it for you if you want

So i was testing some more and i got it to work!, i used the propierties to be an sensor for the opengate message!. Thanks for your help!

you dont even need to have a sensor box … your gate can have a collision box setted to static and ghost

the idea is interesting, can you access the file to play with some ideas for solutions?

The Door Control might help you. It comes with a tutorial how to use it.

fence_door Monster's ready-to-use components - Door Control