this helped me make a shotgun but i am having a huge headache trying to figure out to print the damage of the shotgun so that i can use it for later because using the event any damage command only prints the damage of the first line trace that hits the actor and there is no way to combine the damage using basic arithmetic as then every bullet fired or that hits any object will be included in the calculation of the shotguns damage making it useless and there is no other function that i know of that will only report damage from hit actors that can be combined later
So I assume you want to combine all the individual damage into one, right? To do that, you need to have a float variable that stores the damage per line trace. Then make another variable Int, that will add 1 into it every time a line trace hits your target. On Completed section of the loop, multiply the Int variable with individual line trace damage variable. Then save that multiplication in another variable and reset the int variable counter to 0. The saved multiplication value is how much damage is dealt. I haven't tested it this method, but it should work.
nice bro . i jave sugest for you : make resault of video in begin of video that the propla can see what the fulle resault in this tuto . keep it cool bro love you
It should come with the rifle if you created the project in unreal engine 5. The rifle blueprint will not show up if you made the project in unreal engine 4.
Hey Thanks a lot for the video! I'm able to successfully set up the linetrace. But there's a question - when applying damage to my enemies, some only apply the damage amount of a single linetrace, I find it very confusing and can't figure it out. Do you have any idea what could be causing it?
@@Ali107 Yes I did that, it seems the engine sometimes have problems on tracking multiple damage values that happen at the same moment or high rate of fire. The damage worked on some of the enemies and some don't. I realized that the enemies are based on default capsule component will only receive 1 damage value. I'm not sure if this is related but this is what I found so far... thanks for replying!
@@Ali107 I used apply damage node right after each linetrace, since I had many enemy types in my game, I usually add a tag to things instead of doing the logic one by one.
@@yuancui4305 Hmm, I am in-experienced in using the "damage" node. I always have variables that store health that I subtract through a function. You could instead increase the damage, but that won't make the shotgun damage properly.