How do I make it so the exit gate opens after I collect all the collectibles?

Hello! I’m pretty new to UE4 and as such have very limited understanding of how blueprints and such actually works. I have to use UE4 for an assignment and now I need help to figure things out to make this last part working using blueprints.

I’ve been trying to make it so that once the final collectible is picked up, the camera will change to show the gate at the end open up before returning to the character.

I’ve been able to make it so that once you press a button this scenario plays out thanks to tutorials online, but I would want it to happen as soon as the final collectible is picked up rather than having to interact with a button. How do I accomplish this?


This is the blueprint for the gate and camera.

I have a widget that will tell you how many collectibles you have in a “X amount out of Y” fashion so I assume that once X=Y it should make the gate open. But I just don’t know how to accomplish this.

Any help would be greatly appreciated!

Hi JMK,

There are a few ways you could do this. The simplest could be when you update the “X amount out of Y” you could do a check after this to call the Open Gate Event. This can even be done from outside of your player class. Are you updating the “X amount out of Y” from the player when you interact with the collectable?

I’m not exactly sure what you mean nor how to really “do a check” as you say. As I’ve mentioned, I’m very new to this. I think I may have tried something like this, but I must’ve done it incorrectly.

How it works at the moment is that once the player touches or picks up a collectible (by either walking into it or pressing the action button), this collectible will disappear and add onto the total.


This is the blueprint for the actual collectible when you put it down in the map. I don’t know if this could be used in a way to do what you say would be the simplest way to do it.


This here is for the widget and simply plays the animation for the text that pops up on screen to show you how many you have left.


And this is the event graph for the same widget.

I don’t know if how things currently are works or if I would need to change things up in order to be able to make it so it can do a check for the amount left.

I assume there must be a way to make it so the “open gate” blueprint triggers once all collectables have been collected? I would just like to know what kind of blueprint would be needed and where to put it because I guess I can’t put one in the gate blueprint that somehow references the collectable widget, right? As in it checks for when the amount of collectables left in the stage are 0 and then triggers the event?

This is a time limited assignment and as much as I’m trying, I just can’t figure it out.

There are many ways but following the unreal way could be:
Use the gamemode to save the amount of coins you are collecting, it is the blueprint where the game rules go.
In gamemode create an event dispatcher, “D_AllCoins”
Connect the door blueprint in beginplay with event dispatcher, you will need to cast the gamemode.
When the maximum coins are reached, this calculation is done by the gamemode, they call the event dispatcher.
The door will receive the message and open.

I found a work-around that will have to do. It’s not exactly how I wanted it to function, but for this it should be fine.

I will keep what has been said in mind if I decide to mess around with blueprints in the future.

Thank you everyone who have offered suggestions!