x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to organize Blueprint functionality?

In order to make it simpler, let's say we have a basic collector game with a portal to the next level.

So there are mainly 6 Blueprints - Character, Item (Collectable), Portal, GameMode, Level and Widget.

Game description:

  • At the beginning of a level, the LevelBP calls an "Initialize" function of the GameMode (it counts "all Actors of a Class" and sets a variable).

  • The Item calls after collecting a "DecreaseAmount" function in the GameMode

  • The Portal should be activated/sapwned after collecting the last Item @Q2

  • Upon entering the Portal, a message "Level Completed" appears and after a small delay a new level is opened @Q3

The WidgetBP(HUD) contains a counter (indicating the number of Items left to collect) and a text "Level Completed" (hidden by default).

Here are my questions:

  • Q1 - Where should the Widget be created (Character, Level or GameMode), so that the access to its components wouldn't be complicated/annoying?

  • Q2 - Is the GameMode or LevelBP responsible for creating the Portal?

  • Q3 - Which Blueprint should handle the "Level Completed" message and open a new level?

  • Q4 - What if we would further monitor the Characters HP in the Widget? Would the project structure change? Should there be two widgets used in that case?

Any help would be greatly appreciated!

Product Version: UE 4.19
Tags:
more ▼

asked Jun 03 '18 at 09:09 AM in Using UE4

avatar image

BlackBird604
19 3 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

1 from the sound of things i would probably have most functionality in the game mode in this case. this way you can keep things neat and organized and it will allow most gameplay elements to be easily located.

2 i would have the portal as its own blueprint in the level. that is unless you want to spawn it in dynamically so that it appears near the player but that is a bit more complex. if your spawning in the portal you will also need to come up with a way to tell it which level to open. while you could do this all in the level bp it would require you to duplicate the script for every level which isnt a good method since it will make it difficult to make changes to. if you make it a actor bp thats placed in the level then you could have the level to open as a public variable so you could easily set it from the details panel.

3 for the creation of the level completed widget i would again have that as part of the portal bp since the widget should only be created when the portal is activated so they are closely related dependency wise (so to speak).

4 if you were going to monitor the characters hp then that widget could be created anywehre you like really as long as it get created at the start of each level (so gamemode, character, or player controller would work). as for having two widgets im assuming you mean one for health and one for collectables needed, that again is really personal preference but you could easily make them into one widget if you liked.

more ▼

answered Jun 03 '18 at 01:10 PM

avatar image

ThompsonN13
10.1k 33 10 25

avatar image BlackBird604 Jun 05 '18 at 04:49 AM

Now it makes a little more sense to me. Thank you very much.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question