ZSLightningGun - a lightning gun library for ZScript

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1109
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

ZSLightningGun - a lightning gun library for ZScript

Post by Jekyll Grim Payne »

Github repository: https://github.com/jekyllgrim/ZSLightningGun/
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):
User avatar
Brohnesorge
Posts: 495
Joined: Sat Oct 08, 2016 9:10 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Win10
Graphics Processor: nVidia with Vulkan support

Re: ZSLightningGun - a lightning gun library for ZScript

Post by Brohnesorge »

You've saved me a lot of banging my head against a wall and a lot of (probably unrelated) headaches, thank you for this
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff

Re: ZSLightningGun - a lightning gun library for ZScript

Post by DoomKrakken »

Hoo boi I gotta try this out... :D

Return to “Script Library”