Space Engineers

Space Engineers

Not enough ratings
Aligned Weapon Trigger
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
379.193 KB
13 Dec, 2022 @ 6:13am
18 Dec, 2022 @ 5:04am
2 Change Notes ( view )

Subscribe to download
Aligned Weapon Trigger

Description
The script allows making sequential-firing weapon assemblies.

It has two main functions:
- trigger fire on a weapon that is aligned with a reference block
- control rotors during allowed firing

Script would fire the barrel that is lined up with a reference block (welder or timer).

It also sets up rotors and resets them on demand.

Add a rotor and weapons to a group containing PB. Add welder block to the same group. The welder should be NOT lined up with a rotor, but be placed higher, lower, etc relative to rotor axis.
Imagine a clock with center at the rotor, and the clock hand would be the ref block position. Then the script would allow firing for a gun that matches clock hand. It can be 2+ guns if you place them on top of each other.

Use argument 'reset-rotors' to make sure script sees them and to reset them to appropriate starting position.

Add a cockpit, then use welder from its' toolbar. LMB welder click would trigger rotary action and firing.

Alternatively, if you are making a custom gun for the AutoPillock drone, replace the welder with a timer (and DISABLE it before running the script or it would fire immediately). Refer to APck building guide for more info. Don't forget to add the timer to this script group.

For higher RPM you can make assemblies that are placed in a line. The reset-rotors command would attempt to set their phase offsets so they won't shoot each other.

Large grid two-stack opposite scheme example here:
https://steamproxy.net/sharedfiles/filedetails/?id=2753329574

Small grid cannon assemblies fully integrated with APck example, Draken GDI:
https://steamproxy.net/sharedfiles/filedetails/?id=2903404372

PB Arguments reference:

reset-rotors - force rotors into initial position with phase offset
fire - toggle fire
fire.On - enable fire
fire.Off - disable fire