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"

Player array in the game state has the wrong player state classes

As explained in the title, when calling "player array" from my custom game state I don't get the classes I'm supposed to get. I have:

  • DeathMatchGameMode (child blueprint of my BasicGameMode which is a child of GameModeBase)

  • DeathMatchGameState (child of GameStateBase)

  • DeathMatchPlayerState (child of BasicPlayerState which is a child of PlayerStateBase)

I checked to have correctly set my game mode and its defaults DeathMatchGameMode defaults screenshot

But on the server it still has the player state that I had in the previous level (which has a different game mode with different classes) and trying to print the player state class name (using a switch on authority node to differentiate between server and clients) confirm that on the server the clients don't have the right class

screenshot of printing on server

That said, on the clients they do have the right class but they often don't have other's client references

screenshot of printing on clients

Product Version: UE 4.19
Tags:
screenshot-98.png (108.5 kB)
screenshot-99.png (38.2 kB)
screenshot-100.png (33.3 kB)
more ▼

asked Mar 20 '18 at 06:20 PM in Blueprint Scripting

avatar image

Lazy_
22 2 3 6

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I think I found the problem: I didn't let the engine load and replicate the new objects.

A simple delay of half a second was enough to load everything properly.

more ▼

answered Mar 25 '18 at 05:15 PM

avatar image

Lazy_
22 2 3 6

(comments are locked)
10|2000 characters needed characters left
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