Action Data Creation & Setup
Last updated
Last updated
For my template I use a Primary Asset for Storing the Weapon Data, but feel free to replace this logic with your own. Create a folder and call it ActionData, or whatever you wish. Then Right Click and in the Menu go to Miscellaneous->Data Asset Select PDA_ActionData_Weapon which is a Child Class of PDA_ActionData_Base Name your File and Open it There are a few things to take note of. The Action Cooldown determines how often that Action can Fire, for a Weapon it's basically the Firing Rate of the Rifle. The Fire Action Montage is the Animation that will play when you Fire the Weapon, same goes for the Reload Action Montage. The Weapon Mesh is self-explanatory. In the Content/DAO/Blueprints/Actions/M4A1/ActionData Folder you will find the M4A1 Action Data and you can use the Fire and Reload Montages from there for now. For a Rifle you can also adopt the one used by the M4A1 or you can use the one for the Pistol if needed. You can Also Duplicate that Child Linked Anim Layer and Replace the Poses in the Class Defaults with your Own. (If you do, make sure to reference that one in your Action Data so that it gets loaded with the Weapon. Go to Edit->ProjectSettings->GameplayTags In that window expand the 'Gameplay Tag TableList and open the GT_DAO_States Right Click on the Appropriate Weapon Tag and Duplicate it. Rename it Appropriately. Your Action Data should now look similar to this one. (Item ID is currently not being utilized in the Project) Go Into your Character Blueprint and Select Class Defaults and Add the Action Data as the Value and Set the Key to the Gameplay Tag you Created.