Activating powerup in multiplayer (similar to Overwatch Ultimate)

Hi guys,

I am currently working on a first person shooter x beat em up game that uses multiplayer. So far, I have got the shooting working, as well as a simple AI that follows the nearest player.

In my game, the player charges up his weapon by getting kills. When the weapon is fully charged, he is able to activate Beat-Em-Up mode, or simple BEU mode. To make this working, I simply added an activation with a timer instead, so that once it is working, I can move over to making the charging working.

However, I am running into an issue with the weapon swap. For this game, I am using my own weapon system which consists of a parent-child structure. I make one blueprint that handles all the code, and the children will then simply be using the base variables. This way, I can create simple weapons very swiftly and prototype different ideas for this game.

To swap the weapons, I am destroying the current weapon, then I spawn in a new weapon and set it to the player. To access the weapon variables, I am using a weapon master reference variable. This variable is also used for removing the weapon.

Here are all the blueprints of my weapon activation:

Activation works fine on the Server. It removes its weapon and adds back their gun no problem. The issues persist on the Client’s end however. It adds the weapon, but never removes the gun (so it has 2 weapons). It also does not see the Server’s weapon change. Instead, it sees a second weapon added and then removed.

Here is the code I use for the timer (which resets it to FPS mode):

203549-9.jpg

How do I solve my issues? I want the server and client activating their special mode, and see the correct weapons on each one’s end.