Posted March 16, 2024 by Johncarlos Lillo
Johncarlos Lillo
3/15/2024
Part 1: Animation States and the Problem
After finishing up the Data table and Inventory for the player, my next task is to tackle the Starter Pistol for the player. However, I realized that in order to swap between different gun classes (Pistol -> Assault Rifle, Assault Rifle -> Submachine Gun, etc.), I would also have to change the animation of the player as well in order to have a seamless transition between said gun classes. The current issue now is that the pistol is currently being held like an assault rifle, when both hands should be on the grip of the Starter pistol.
Wanted Look:
Current Look:
Part 2: The Solution
I found that I could just make a new enum likeI did for the weapon types. I made multiple Enumerators, for Hands, Assault Rifle, Pistol, and Melee. I am currently planning to add more for LMGS or Snipers for later on, as well as Wonder Weapons. I then added this Enum into the Weapon Data Table, and then made it so that in the BasePlayer, the Animation State is on a switch for whenever the player switches to a specific gun class.