Hi, I have a question. I’m trying to make a 2D game. I have an object that I want to use as a key to open a path that is blocked by a barricade. I’ll put pictures here so you can visualize it. I’m using blueprints and I don’t know how to make it so that if I pick up a coin and go to the barricade it disappears and if I don’t have a coin it doesn’t disappear.
We warmly welcome you to the Unreal Engine community!
Just so you’re aware, this topic has been moved from the International forum category to the Development - Programming & Scripting - Blueprint forum category.
Just remember, when posting, please review the categories to ensure your topic is posted in the most relevant space.
Wishing you the best in a resolution to the issue you’re having,
You must create a variable of type bool, you set this variable to true when you pick up the key.
On your barricade you add a Trigger, and if the bool is True, you can pass.
Be careful, you must set your bool to True before destroying your Actor, otherwise it cannot access your variable anymore.
Here is an example you can use: