Unlocking a door if the player has enough points - Beginner problem

Hi there,

I’m a relative newbie when it comes to the Unreal engine. I’ve toyed around with it, but never really done anything seriously.

Now though I’m try to make a relatively simple game just to sort of get the hang of the tools.

I started from scratch, so no pre-made game mode stuff is in this.

Basically what I want to do is that the player is gonna be collecting points and once they reach a door if they have enough the door will open. I thought it would be pretty easy but I seem to be having some difficulty.

Here’s what I have set up so far.

This is on the player blue print for keeping track of the points.

Here’s the points object. It doesn’t really do anything special besides exist and then be destroyed.

And here is the door blueprint that is just destroying the door for now (I’ll probably make it do something other than destroy itself once I figure out this trigger problem)

It’s very possible I’m missing something incredibly obvious so feel free to tear this apart and tell me a better process. Still learning. I looked for other tutorials to do similar things, but didn’t find anything helpful.

Any help is appreciated. Thanks!

Try Removing the Point Object and Just using a TriggerBox with the Door . so when the player collides with the door . in the Door BP : Actor begin overlap . Cast to “Your Player BP” with the object as either Other actor or using a Get Player / Pawn . Then after casting . get Points which is an Int in the player controller And Then Do a Comparison (Branch : If Points is >= 5 then do something) .
I hope this has helped :slight_smile:
Your BP doesnt work because you are not sending the Current points to the Door BP / you are not casting them to it . and also . You are not Using the Cast node on the Player BP . i think you should Redo this . as it will help you fix the Problems

Not sure if this helps but I would remove the overlap for the player and just cast to the player when the points overlap and then increment the score from there. Also, you need to make sure that you destry the points object after everything else is fired off.

This worked! Thanks so much DproBoy! I still have a lot to learn, but I can finally get past this roadblock.