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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Dedicated server (Trying to read property HUD)

We create a widget in the class Pawn. Pass the widget to the variables, in the widget, we perform calculations and output to the screen. We have an error in the process of work. As we can judge the calculations are correct.

(variables in companets have the meanings) (variables between Pawn and the widget are linked)

Product Version: UE 4.19
hud.jpg (653.2 kB)
nn.jpg (389.9 kB)
kj.jpg (387.4 kB)
more ▼

asked Apr 10 '18 at 07:17 PM in Blueprint Scripting

avatar image

1 1 1

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

1 answer: sort voted first

The server doesn't have a HUD so you need to check what you are running on before doing any HUD work. You can set up a Branch and feed it the result of IsLocallyControlled. On True, do the HUD work.

This will prevent the server from creating a HUD but it will also prevent other pawns (other players and/or AI) from affecting the HUD of the local player.

more ▼

answered Apr 10 '18 at 08:02 PM

avatar image

4.4k 32 77 42

avatar image 35363 Apr 11 '18 at 11:59 AM

The widget connects in several Pawns, the variables in them have different meanings. How you can attach a widget to the HUD, while leaving the variables to the widget in Pawn?

avatar image Jin_VE Apr 11 '18 at 01:29 PM

I'm not sure I understand you but it sounds like you want non-local pawns to affect the HUD. In that case don't use IsLocallyControlled but instead use SwitchHasAuthority and run the HUD-related code from the "Remote" execution pin.

avatar image 35363 Apr 12 '18 at 06:53 PM

Thanks for your answer, you've been very helpful. Now we have a little problem, we need to do all the calculations on server, and the client to ban any actions with calculations.

avatar image Jin_VE Apr 13 '18 at 02:31 AM

I don't think I understand. If you need to move functionality from the client side to the server then how to do it will depend on the functionality. I assume you know how to make a server RPC. Beyond that, I'm not sure what to tell you.

(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