Creating FPS Multiplayer Prototype
Gameplay Updates Spawning Attackers and Defenders – Setting Up Weapon Equip Logic When setting up player spawns for attackers and defenders, I wanted to ensure that each character equips a rifle if they don’t already have one. So, I first checked if the rifle was present, and if not, I moved forward with equipping it. Equipping the Rifle (Third-Person Mesh) To handle rifle equipping, I created a BlueprintImplementableEvent in C++ called EquipRifle within the TP_BaseCharacterWeapon class. I made it both BlueprintCallable and BlueprintImplementableEvent so I could call it from C++ and define the logic in Blueprints. In this event, I: Turned off physics and gravity on the rifle. Disabled collision for both the rifle’s mesh and its sphere collider. Attached the rifle to a socket on the third-person mesh. Communicating with the Character (Using Interfaces) To notify the third-person character to equip the rifle, I added an EquipRifle function to my Blueprint Interface...