Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Trivial Psychic on December 11, 2004, 01:14:06 pm

Title: Adjustment to Swarm Entry
Post by: Trivial Psychic on December 11, 2004, 01:14:06 pm
Howdy all:

I'd like to propose a slight adjustment to the $swarm entry in the tables.  Swarm is primarily intended for use with missiles like the Hornet and Tornado, but I have seen it employed with pulse and beam weapons to get a turret with multiple firepoints, to fire from all firepoints simultaneously.  I myself have attempted this, but I find that, for example, a weapon with a swarm of 2, firing from a turret with 2 firepoints, will result in the 2 shots not being fired simultaneously, but imediately after one another.  I'd like to propose a +swarm delay facter to be inserted just after $swarm.  Like beams, the time factor would be in milliseconds.  If I wanted those 2 shots to fire simultaneously, the table entry would look like this:

$Swarm:   2
+Swarm delay:  0

Now, some mods might want a 2 point turret to send out a continuous stream of shots, but with a considerably reduced fire rate, so a swarm factor of 250 would cause the shots to be ofset from one another by 1/4 of a second.  This feature could also be useful for its original intent of swarming missiles.  I'm not sure how diffucult this would be to impliment from a coder's perspective, but I'm sure you can see the use and flexibility of such an addition.  It unfortunately doesn't do anything about the single beamglow issue when using multi-shot beams.
Title: Adjustment to Swarm Entry
Post by: Fury on December 11, 2004, 01:17:57 pm
If I understood this right, it is already implemented.

Example 1.
Code: [Select]

$Swarm: 4
+SwarmWait:                  0.1


Example 2.
Code: [Select]

$Swarm: 2
+SwarmWait:    0.9


Swarmwait defines the delay between shots in a salvo. While firewait is delay between salvos.
Title: Adjustment to Swarm Entry
Post by: Trivial Psychic on December 11, 2004, 01:22:06 pm
Wow!  *Goes off to test this interesting developpment (no pun intended)*
Title: Adjustment to Swarm Entry
Post by: Fury on December 11, 2004, 01:26:27 pm
I have never tested it on beams though... But TBP uses that on many pulse type weapons.