Modern Survival Horror Framework v0.5.0 is now available! Download it now through the Epic Games Launcher.
Notifications
Clear all

[Sticky] Support – Modern Survival Horror Framework

853 Posts
47 Users
272 Reactions
36.3 K Views
criss1818
(@criss1818)
Patreon Supporter
Joined: 5 months ago
Posts: 57
 

@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?


This post was modified 2 months ago 2 times by criss1818

   
ReplyQuote
212ceb9a9627603fd4afc50f32757b5a6e61dee5b9c8d22c97da72dbe0c05505?s=80&d=mm&r=g
 CaLo
(@calo)
Trusted Member
Joined: 8 months ago
Posts: 89
 

@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!


This post was modified 2 months ago by CaLo

   
Hosna reacted
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@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.


This post was modified 2 months ago 2 times by Farshad

   
criss1818 reacted
ReplyQuote
criss1818
(@criss1818)
Patreon Supporter
Joined: 5 months ago
Posts: 57
 

@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!


This post was modified 2 months ago 2 times by criss1818

   
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@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.


This post was modified 2 months ago by Farshad

   
criss1818 reacted
ReplyQuote
7ae9ad97005f5c26a0c7c90de30ecfc1aa743a1b78e6cc18854755a47981945f?s=80&d=mm&r=g
(@gamestart)
Eminent Member
Joined: 4 months ago
Posts: 24
 

@hosna
I'll go ahead and implement these changes.

Thanks for helping me find it. I thought it was in a variable somewhere.

But I'm still running tests.

Thank you.

=)



   
ReplyQuote
criss1818
(@criss1818)
Patreon Supporter
Joined: 5 months ago
Posts: 57
 

@farshad hello! I have tried to work with a progress bar and saw some of the things in the graph section on the inventory widget. 

Can I ask how I can refer my healthbar progress bar (I have put inside a new widget HUD on screen) on the health variable? I saw how it's handled on the graph in the inventory,but what can I do inside the graph of the new widget I created ?



   
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@criss1818 Yes, you can do that from any widget.

First, use the GetComponent function to retrieve the AC_Health comp. Once you have the component reference, you can call GetHealth() or access any other variables and functions it exposes. I hope that helps! If not, just let me know, and I'll be happy to explain it in more detail.



   
criss1818 reacted
ReplyQuote
criss1818
(@criss1818)
Patreon Supporter
Joined: 5 months ago
Posts: 57
 

@farshad Yes I have currently set it up to work in the viewport,but how I can connect the progress bar with the health now?



   
ReplyQuote
B56c20ecf128d61ecd421d8ec6f1cb89ec05628f36d095ae26b8faa41a84594d?s=80&d=mm&r=g
(@iamry4ndee)
Eminent Member
Joined: 2 months ago
Posts: 22
 

@farshad Hello, can you suggest the best approach to get the flashlight beam to follow where the character is looking?
For example, if the character is moving while crouched, the light is pointed to the floor instead of lighting up the way ahead. Also, for inspecting the environment, a flashlight beam that moves up and down depending on where the camera is aimed seems a good upgrade imo.

The flashlight is obviously not attached to the head but is there a trick to get this done?



   
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@criss1818 Call the Set Percent function of the progress bar and pass it the result of dividing Health by MaxHealth. Put this part in the Event Tick for now. Later, you can move it to a more suitable place, but for now, this way you can update the progress bar.



   
criss1818 reacted
ReplyQuote
criss1818
(@criss1818)
Patreon Supporter
Joined: 5 months ago
Posts: 57
 

@farshad Yes I can see the bar upgrade from 0 to 100 in the beginning,but when I receive damage it doesen't update,I am missing something?



   
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@iamry4ndee In first-person mode, the flashlight follows the camera. However, in third-person mode, by default, the flashlight is attached to the character’s chest, similar to the Silent Hill style.

If, for example, you want the main character to wear a hat and have the flashlight attached to it, or you want to assign the flashlight to another location on the character’s head, you can simply copy the name of the current flashlight socket, then delete it, and finally create a new socket with the same name on the character’s head bone. After that, adjust its position and rotation.

This way, wherever the character looks, the flashlight beam will point in that direction.

I made a short video for you that might give you some direction. I hope it helps.


This post was modified 2 months ago by Farshad

   
iamry4ndee reacted
ReplyQuote
Farshad
(@farshad)
DEVELOPER Admin
Joined: 8 months ago
Posts: 491
Topic starter  

@criss1818 If you correctly get the Health and MaxHealth values and connect the widget to the viewport, it should detect the damage correctly.

Please watch the video I attached. I only added it to the viewport temporarily for testing purposes, just to quickly verify that the system was working. This may help if you miss something. Add a Print String and check the value you get when you take damage. I see you pass the value to another function! Also, check whether your HUD is active?


This post was modified 2 months ago 2 times by Farshad

   
criss1818 reacted
ReplyQuote
B56c20ecf128d61ecd421d8ec6f1cb89ec05628f36d095ae26b8faa41a84594d?s=80&d=mm&r=g
(@iamry4ndee)
Eminent Member
Joined: 2 months ago
Posts: 22
 

@farshad Thanks for taking the time to create this video. I knew that the only and easiest way is to move the socket to the head but it just feels off, design wise unless the character is wearing a construction or mining hat which I don't intend to have in my game. 
What I really wanted to do is somehow, get a bit of up and down of light beam movement when looking up or down and keep the flashlight beam to face forward while moving while crouched instead of it being pointed on the floor. I just cant think of a way to do that while keeping the mesh in its original socket, not in the head.



   
ReplyQuote
Page 39 / 57
Share: