Documentation: https://github.com/jekyllgrim/ZSLightni ... /Readme.md
What this is:
ZSLightningGun is a ZScript library for creating lightning-gun-like weapons or effects. It offers the following features:
- A function that attaches a controller to a specific actor (meant to be the target of an attack)
- The initial victim can create extra arcs that link to other valid victims around it
- Customizable number of arcs (splits)
- Customizable number of total links (how many times it can link from one victim to the next)
- Customizable damage per tic
- Visuals: a function that drawns a particle-based lightning between two points (can be replaced with entirely different visuals, if desired)
- The same victims can't be hit multiple times from the same source, meaning the attack will actually spread through crowds instead of looping back to random victims
- When splitting, lightning arcs will always pick the nearest valid victims first
- Example weapon using Plasma Rifle sprites (sprites not included)
MIT License — do whatever you want with it, just copy the LICENSE.txt file to your project.
Demonstration (only shows one of the possible behaviors):