Download

Taking something built into overall level blueprint and reusing it?

Hi all,

I’ve started using BP today after the DevDay shook off all the fears I had. I followed Teslas’ tutorial on how to make a hunger system because it seemed really straight forward and I thought hey why not? The player gets hungry, when hitting a certain point the post process kicks in, they pick up canned food and restore five points of health. Straightforward. I’ve got a problem though because the pick up is encompassed within the overall level blueprint. Now to put other cans around the level do I have to add them into the overall level blueprint too? How would I go about making one in my blueprints folder that I can just drag and drop that functions with the hunger system I’ve made for the overall level blueprint? Sorry if this is confusing I’ll answer any questions. Im sure the answer is really simple but I’ve looked through the docs, some tutorials on BPs and my notes but I can’t solve this problem. I’ve attached a couple of screenshots to demonstrate.

Fig. I - The overall level blueprint/Section I want to make separate.

ARGGGGGH.jpg

Fig. II - The culprit of my woes.

7f4459b64bd8e3390c614b1d7fc0f18833458168.jpeg

Sorry to have to ask this, I know all the begging gets annoying but it’s a transferable thing so I can use the information when making other things in BP.

Thanks in advance all :slight_smile:

Sorry to double post but I’ve looked into it more and I should be able to create a seperate BP with the code for the pickup and I need to set it to be able to “talk” to the hunger system. Could anyone confirm this or let me know if that’s wrong?

Does this help?
https://www.youtube.com/watch?v=q_9QKzLK-sU
You’ll probably want the pickup to see if its a player that touched it, and if so, fill 'em up.

Hi James,

yeah it works exactly like that but it tells a “Hunger” Integer that it’s restoring five hunger points on the overall level blueprints. If I make a new Integer called “Hunger” in a fresh Blueprint will it still refill the hunger bar? Sorry I’m still new to all of this and I’ve tried but can’t get the counter to go back up when making a new one.

Also apologies for the terrible wording. I can try and make a video displaying it a little better tomorrow if that will provide more information?

It seems like Hunger should be a variable on your Pawn, no?

That makes more sense. I’ll give that a go then.