@farshad Perfect,is also possible to create a new weapon type? I am constantly duplicating the pipe and changing animations and mesh,but how can I add a new type in the overlay on the ABP_Metahuman?
Also how the hit reaction on the enemies is handled on the close weapons? I have changed the hit reactions already and replaced all the bones hit reactions with another one,but with the pipe the Zombie is basically standing,there is any chance to set an universal hit reaction since im mostly using close weapons?
Does the new flashlight system handling be changed with another main animations for the flashlight (idle,walk,run) and the flashlight mesh can also be changed in 0.5 update?
@hosna Thats weird that is the first thing i tried to modify yesterday, and it did nothing.
Edit: i have 2 AC_Data, was modifying the wrong one, why i have two, i dont know, migrating is such a bad way of updating content, for such a big company epic is so slow to add funcionality to the launcher. Anyway now everything is fine, thanks for the help!
@criss1818 Hey Criss, the default hit reactions that are based on hit bones included in the Zombie class are designed for firearms. For the Pipe, you can implement a different hit reaction. You can handle this in AC_AIBehavior inside the ReceiveDamage event. From there, use the GetType Interface to determine which weapon caused the damage (for example, the Pipe or any other custom weapon) and set the Zombie's hit reaction montage accordingly.
As for the flashlight mesh, you can already change it. Simply open the Character Blueprint, select AC_Data, search for the flashlight mesh, and replace it with your own. We will explain the new flashlight system and how it works when the update is released. At the moment, this feature is still under development, so it has not been finalized yet.
To add a new weapon type, first add a new entry to the E_Weapon enum. Then open AC_Combat and review every place where the WeaponType variable is used, as there are several nodes based on this enum. Update those nodes wherever necessary to support your new weapon type.
After that, open the Character Blueprint and go to the Overlay Layer graph. Find the section where the aiming offsets are selected based on the WeaponType variable, and add support for your new weapon type there as well. Before adding a new weapon type or making larger changes, it's always a good idea to create a backup of your project, especially if you're not using Git or another version control system.
If you run into any issues while adding a new weapon type, don't worry. As I mentioned before, we're planning to create a video tutorial covering how to add a new weapon type. However, because this area will most likely change in the 0.5 update for a simpler approach, we're waiting until that update is released to make sure the tutorial reflects the latest implementation 😀
Hope this explanation helps. If anything is still unclear or you have any other questions, feel free to let me know. I'll be more than happy to help.
@farshad thank you as always! I am going to try these options,Im currently working on the healthbar hud (we already talked some days ago) can I ask what can I insert in the get percent? I remember I needed to get component and call the health,is this right? Also where I need to call the HUD? In the begin play of the metahuman and add to viewport or in the parent character?
For the flashlight,I was talking about the new handled flashlight system in 0.5,is this right? It's because I mainly want to change the main animation of the handled because im going to change it with a lantern handle animation,as well the mesh and the light system!
@criss1818 Yes, you can get the health value from GetHealth in AC_Health.
For displaying the health bar on the HUD, you can add the required functionality in one of the components, such as AC_Inventory. Create a function for it and add it to the ViewModel.
Regarding the flashlight mesh, yes, it will be swappable. However, if you change it from a flashlight to a different handheld item, such as a lantern, you'll likely need to make some adjustments to the animations and potentially other related systems as well.