HUD is valid exctept when it is not (HUD ceases to be valid in multicast)

Hello,

I wish to display a change in the HUD to all players. The way I do it is as follows:

  1. (Player Controller) something happens, executes custom event on server
  2. Server event calls multicast in Game State
  3. Multicast event gets the player’s HUD (game state has a ref to self’s game controller, which has a reference to the HUD), then calls event in HUD
  4. All players get the change except the listen server host, which says it has an invalid HUD

From my understanding, this is expected, since the listen server host is actually running two instances, one as a client, which should succeed, and one as a server, which forbids HUD creation and therefore would not have one.
The issue is that the host’s client does not seem to have a valid HUD either.

The reference seems to work outside of multicast, no idea what is going on.

Performance was never an option. If this is the only way, so be it.

Bad news, this worked. It should not have worked. But it did.

The creation of the HUD reference is perfect. There is no room for possibility where the HUD is not created or assigned. So I have no idea why finding it after the fact works.

I guess this is staying. Performance be damned.

you dont use multicast for these things,

  1. create a variable that is RepNotify
  2. in the OnRep event call an EventDispatcher
  3. HUD binds to the EventDispatcher

put simplistically MCs are for One Time Events and RepNotify is for States.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.