Page 1 of 1

Trigger script on weapon-fire, Apply damage scripted

Posted: Mon Jan 11, 2016 9:17 pm
by Ranakastrasz
Is it feasible to have a script run whenever a weapon/turret/whatever fires? Or, better yet, on any data-based event?
Also, is it possible to run a data-event from script, or apply damage of a type (such that resistances and so on are all respected)

I have a flamethrower mod, which broke with one of the last 5 or so updates, since it worked for 12.10, but not now at 12.21.

Essentially, I had attached several line-damage effects, which used the railgun's targeting logic to damage everything in the area, and simulated a sort of cone via several layers. However, in the current game version, the railgun's logic is entirely nonfunctional, so the flamethrower is nonfunctional.

The flamethrower weapon itself is a modified shotgun, since the flamethrower type has pretty much zero customization support.
This is the code I've been using.
code