After collecting objects, I want one last object to be clicked and disappear

I have a code where the players collect four keys from four different locations. After they have collected the keys, I want them to click on a lock and I want it to disappear. Right now, after I have collected the keys and click on the lock, it is not disappearing. Any advice on how I can code that?

1 Like

An example, check the 2nd scene of: EYG-SML
sleutel=key; slot=lock;

1 Like

could you maybe make this clearer?


Yes, of course, here you can see an English example of the escape room: WZY-XPT
The logic is to collect all four keys, making each time the counter rise up for 1. So when the counter is 4 if you click on the lock it disappears an opens the doors. The player has actually to do something (click on the lock) so that the wanted action will happen (in this case the lock disappears, and the doors are detached from their parent and are also deleted).
If the counter is less than 4 it just gives a massage that you will need to collect all the keys to get out.

(Switch the camera to walk mode to make it more difficult for the players)

1 Like

if you still need help with this, I may be able to. I saw you had made multiple outcomes for actions. If you do this with the lock you could have it dissipate with the certain object by coding it to dissaper when the play dose the correct action.

you can delete the object if you use co bloxs