Download

Explosive items with radial damage

Hey guys, I’ve set up this blueprint so that when the player shoots the barrel, it begins to lose “health” and explodes after a few seconds, and I’ve created a radial damage feature via a box trigger, so if the player is in range then they take damage from the explosion. The problem is, that if the default value for “is in range” is false, then regardless of whether the player is in range, they don’t lose health, and if I set it to true it’s the opposite.

ue4forumshelp69.PNG

When “is in range” is default value false, I don’t get the print string or health change
ue4forumshelp70.PNG

If player is in the trigger box collision of the barrel, then set is in range to true
03d289922b468f2974fdd355c02219f3cc9cb948.png

Thanks in advance!

Thanks for the reply. I’ve actually never used this function before so I’ve tried to set it up but it doesn’t work (not really sure what to put into the object types node)
e6bec8a397d5e7e379322dcedb45deeb9738a7cc.png

=)

this is instantaneous function, you can call it in any moment and it would return all actors in sphere shaped game space with given center.

so your setup would looks like this

Cheers for this advice but I’ve found out what the problem is. It’s to do with the collision on the trigger :slight_smile:

have no idea why do you even use those collisions in simple explosible item.

Interesting, I didn’t know about that function either. Is that somehow better than using a collision sphere and Get Overlapping Actors? For if you want to damage every actor in a certain range.

OP “is overlapped” bool system is just silly, so we wouldn’t even discuss it, but im using this function over collision sphere, because i don’t need overlapping collision all the time, if i want to know actors in certain area i use the function.
those fireballs done with exact algorithm which i show on a screenshot in previous post.

Okay I’ve just looked at the fireballs video you made and it looks cool, so I’ll try and base my blueprint around what you said but I’m still fairly new to blueprints so could you help me set it up? Is there anything from the old blueprint that I should keep? Like when I hit the barrel after a few seconds it blows up, like where will that fit in. Thank you

2e4f71aea3378132af12ec42b33d84f03b87cf49.png

You could just put a simple delay after oncomponenthit and set it to however many seconds you want.