Changing character hats

I have a system when characters in my game can have different hats. As some hats have special functions and need to react to the environment I have created them as actors rather than a static mesh.

Currently I add the hat on the BeginPlay event, calling a create hat event that is set to run on the server. This create hat event spawns the correct hat and attaches it to the player.

This works in the editor on all players. But in a build when a client joins the server the hat only appears on the server.

Here is the first method showing event play calling the RPC on the server and the creation of the body part blueprint.

Load mesh is then called on the body part to load the correct static mesh and attach it to the joint.

Post some screenshots from your function. Maybe you missed something. Do you call only on Server or do you call a multicast too?

Thanks for your feedback, I have added some screenshots. I am only making a server call. I thought that spawning an actor on the server would create it for all players - including those that joined later.

Do you call this function on your character? If yes, try to make this function in your gamemode blueprint.
You can use the Event: OnPostLogin. From that you can get every Client Controller and cast this through a custom Event to spawn the hats.
A good tutorial about this Methode is here:


Hope this helps you.

This looks like the tutorial I’ve been looking for. Thought it just dealt with the Steam matchmaking. I shall work through it and post a working implementation. Thanks for the pointer.

No Problem. This tutorial helped me alot. There is so much you can learn from. I hope in this is what you looking for.