TL;DR: Hold
CTRL+SHIFT while clicking to auto shot to spray and pray when it's enabled.
The newest release of OXCE+ includes a bit of code I wrote for "spray" autoshot attacks, and since it uses some keyboard shortcuts/mechanics not used anywhere else, I wanted to provide an explanation for how it works. First off, under the hood the engine is using waypoints similar to those placed for firing a blaster bomb, then placing the shots from an autoshot attack spaced out evenly along this waypoint path as if you were able to separately click the firing position for each shot. That attack looks like this:
The laser rifle from that demonstration has the following lines added to its ruleset:
items:
- type: STR_LASER_RIFLE
autoShots: 10
sprayWaypoints: 2
In addition, once the auto shot is selected, I am holding the CTRL+SHIFT keys in order to start placing the waypoints; if I had not, the autoshot would have just fired all 10 shots at the first location clicked. The second waypoint clicked did not need CTRL+SHIFT held as it automatically fires the attack when the maximum number of waypoints is reached. If you have the confirm fire mode option turned on, then you will need to click one more time anywhere to start the attack. As with the blaster bomb waypoints, right-clicking will remove the last one placed.
With this code, it is possible to have more than two waypoints:
The laser rifle from that demonstration has sprayWaypoints increased to 3 from 2. As before, the attack automatically fires once I place the last waypoint. If you'd rather stop before the last waypoint, holding CTRL+SHIFT while clicking to place the final waypoint that you desire will execute the attack with only that many waypoints. In this example I stop at 2 waypoints even though 3 are available:
For modders: the default value of sprayWaypoints is 0, which means this behavior is disabled on that particular weapon. In order to turn it on, you must give a weapon more than 0 sprayWaypoints.