Hey guys! I’m trying to make it to where when I’ve picked up all of the items in my level then you will get a win widget and return to main menu. I’ve only gotten as far as making it to where the actor is destroyed and a sound is played when you pick up a book. I’m gonna have 10 books spread around my map, I just don’t know how to put this in the right place so the game knows that you’ve picked up any books at all. I’ve read similar threads but I don’t understand what theyre doing there. I just need some direction here!
This looks like it should help you out: How To Create A Pickup Object With Scoring - #8 Unreal Engine 4 Blueprint Creations Tutorial - YouTube
Im sure this will be covered in the video but you want a bp class that will be able to tell whenever you have picked up a book and then storing this in a variable which can then be displayed on screen with a score count and then you want it to check if the value of the variable is equal to 10 and if so to send you back to main menu / end the game.
Hope it helps.
Thank you so much!! How do I check the amount picked up and then implement my widget? I got it to where it displays the amount picked up so now I just need to get it to display my widget. I’m set up exactly like the video says, thanks in advance for your help, this my last step before I’ve got a complete game i’m so close haha
You will want to go into UMG get a text box to display your number, drag it wherever you want it to be and make sure to anchor it.
on the top right click onto graph.
add a get player character node.
drag the return value pin and select cast to first person character or substitute for whatever your player character holding all the variables is called.
drag off the as(character name here) and select promote to variable name it my character or whatever you like.
Dont forget to connect the white execute pins to each other.
compile and now you should be able to access your player characters variables within umg.
enjoy
as for checking the ammount picked up you need to have a pickup system implemented, which i beleive you should already have after following that video.
then once you have done what i said there you should be able to access the variables you set up before and then assign them to a text box etc to show the value of that variable.