Creating a chained lightning projectile that bounces from enemy to enemy in Blueprints

Hi Raidmoot,

Maybe start with creating a list of nearby “enemies”. How that works entirely depends on what data you have on your enemies. Assuming they are a bunch of actors in the scene, you could lean on the physics system to test for an overlap, sort results them based on distance, and perform line traces to verify line of sight.

If you don’t mind some more randomness, it might be interesting to lean entirely on line traces fired off in random directions over the course of multiple frames, until they hit a suitable target.

If any of that is slow, you’ll want to look into ways to reduce the amount of work that needs to be done (e.g.: object channel for affected enemies).

Damage depends on how that works in your game.

Visuals could be done in many ways, and finding the best way for your game is one of the things that places the word “work” in the word “artwork”.

All that said, this seems like fairly basic stuff, and you might want to start by learning more of the fundamentals of gameplay programming in Unreal. A somewhat complex example like this can definitely help to keep you motivated to move forward. But you have to be lucky to get a useful reply in the forums.

1 Like