I used this code to try and open a locked secret door, but i’m sure where i went wrong. Any Suggestions please?
The get input on the LoadLevel behavior gets the number level you’re on as a number. You are supposed to connect it to go.
Did that but it still dosn,t open the door
Connect “this y” to spawn.
But also connect the extractors to the done ouptut of the animation.
If you’re still having issues, could you leave the game link with what level this is on and in what object?
HEHE this topic is all mine for the taking…
This is what you got wrong, you made a common mistake and you set the collision to the secret door itself however I know that the collision was for the person.
Please call this the solution.
Thank u. but its suppose work when I have the key. I was able to go thru the locked door without a key.
I’m busy at the moment, but if you still need help when I get back, I’ll take a gander at what you need.
Sure thank u very much no rush
Then you need a mailbox that turns on a switch,
connect the collision to the switch and replace the switch output with all the collisions that the collision is connected to.
I connect the switch output to the extractors?
Yeah, everything the collision is connect to should be the output of the switch.
And the collision should just go to the input of the switch
Well, there’s actually some solutions easier and don’t take much time to make, my code needs 2 objects as well, here’s my code:
Player:
Door/Barrier:
![Screenshot 2024-05-11 8.20.26 PM](https://community.flowlab.io/uploads/default/original/3X/d/6/d68140a802f9d5eeb2c1be9de0383b2cc70f9c16.png)
These coses use the key to open the door?
Collision only works if something hits that object.
You coding the door, how is the key suppose to hit the door?
Instead you want the player to hit the key and send a message the door to allow the player to hit it and move to the next level. The door will use the mailbox to see the message. The mailbox and the message must be exactly the same.
Also it would look more like this:
Also instead of spawning the door to make it look open.
You can click the animation behavior and choose “stay on last frame”
Of course, if you want the player to need the key and collision to the door to open. You can also make the code that when the player collides with the key, the door opens.