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 would i switch Player Controller and HUD in game play? This should be simple.

How would I go about switching the player controller and HUD while in game by box trigger? I cannot figure out how to combine them all so this will be a quick fix until then.

Player controller 1 + HUD 1 = activation of inventory/HUD Player controller 2 + HUD 2 = activation of weapons/vehicles

How would i activate player controller 2 and HUD 2 on trigger begin overlap, and go back to original controller and HUD on end overlap? Please and thank you. I am so stuck on this and have been for moths!

Product Version: UE 4.19
more ▼

asked Apr 15 '18 at 06:51 PM in Using UE4

avatar image

29 4 9 14

avatar image christian 79 Aug 14 '18 at 07:51 PM

yes how do you do this in c++.,yes show us how to do this in c++!!!!!!!!!!!!!!

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

2 answers: sort voted first

You are misunderstanding the idea behind the player controller.

The player controller is set by your Game Mode and you are not supposed to change it routinely. Controllers are usually changed during loading when a new Game Mode is initialized. Example: main menu player controller transitions to multiplayer player controller when a player enters a multiplayer match, however this is done by loading a new game state and a new level. I am not saying that is impossible (I really don't know) but I am sure that it is not recommended.

The player/ai controllers represent a useful abstraction for realizing the internal network architecture. Think of the controller objects as the place where input events originate from and player controllers are associated with a network connection in multiplayer games while the AI controllers are only run on the server.

The HUD is also set in the Game Mode which means that you have to put all your logic in the same HUD object.

In short:

  • Use UMG UI to change between inventory and weapons/vehicles in the same HUD in the same Player Controller;

  • Use the player controller just to send player input to the different possessed pawns like vehicle or character;

  • Handle how the player input is interpreted by the pawn or the active widget.

I am not sure I explained it well but do ask questions if anything is unclear.

more ▼

answered Aug 14 '18 at 03:49 PM

avatar image

1.2k 6 5 9

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

You should detach your character prom player controller, spawn new player controller, possess character, spawn new HUD, and new player controller you use new HUD.

more ▼

answered Apr 16 '18 at 01:01 PM

avatar image

231 1 6 15

avatar image Connormcfarland Apr 16 '18 at 03:17 PM

This sounds like something that would work. Any links to tutorials on this? Thanks!

avatar image MrMcKvarz Apr 18 '18 at 02:37 PM

I tried to do that in blueprints and I don't think that's possible at the moment. Problem is that in blueprints you can't spawn objects that are not inherited directly from UBObject. I can show you how to do that in c++ if you are interested.

avatar image Connormcfarland Apr 19 '18 at 01:16 AM

to be honest i am a complete noob when it comes to C++. so it would probably take a while for me just to get the hang of it. i guess ill just keep searching and playing around to combine the HUD and Player Controller with the other ones. thank you tho for responding to this post, it is actually quite rare that people comment back haha

(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