Can someone help me lock and key system

hello I’ve been trying everything I could think of to get this working and I haven’t found any discussions about this I want to make it so when you cant go the next level until you come into contact with the key or item that “unlocks” the door here’s my game link I already have the the game setup for experimenting I would like the diamond to be the key to the door behind it https://flowlab.io/game/view/723253

Did you try collision player key send message to lock receive message toggle switch collision player in go to next level?

If the lock is off screen and not receiving the message, you could have player collision key set number to 1, player collision lock send message to player, player receive message, in number send number message back to lock, lock receive message filter equal to 1 next level

That makes the key set your number to 1, and touching the lock sends a message to you and then sends the number back to the lock. If the number filtered isn’t 1, it won’t go to the next level

You can have a once reset the number back to 0 at the beginning of every level

Oh, make sure collision to key destroys key. I haven’t tested your game, I’m not home. If these two examples are difficult to understand, hopefully someone that does understand can do an example for me if I don’t get home in the next 6 hours.

I’m on phone so I can’t make screenshot a of the behaviors.

In the key object:
[collision (player)] --> [message (“open” to door object)]

In the door object:
[mailbox (“open”)] --> [(on) switch]

[collision (player)] --> [(in) switch (use same switch as above)] --> [nextlevel]

If you don’t change the nextlevel’s property it will just bring you to the next level.

Hope this helped.

Here’s an example that sounds similar to what you want: http://flowlab.io/game/play/8481?v=2

thank you I really appreciate it

Woah that’s a late response

sorry haven’t been on in a while i’ve been working

I’m still a little bit confused, I’m trying to make it where you eat your food bowl in one room, and then you can open the locked door in the starting room IF you go back to it and touch it, but I’m confused, can someone give me a behavior example? The link is https://flowlab.io/game/play/1268420

please dont comment on post that are over a month old. It pushes the new posts down and clunks up the forum.

If you didn’t find a solution and still need help then please create a post yourself