Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: TrashMan on April 30, 2003, 05:42:16 pm

Title: Primary fire cycle?
Post by: TrashMan on April 30, 2003, 05:42:16 pm
Weapons cycling


Does anyone know if it is possible to make a fighter fire his primary in a cycle?
So if he has 4 guns (total) then it would first fire from the first barrel, then the second, then third, then fourth, and then again....

The question is - cycle in a slot or all guns cycle?
Title: Re: Primary fire cycle?
Post by: IceFire on April 30, 2003, 05:48:28 pm
Quote
Originally posted by TrashMan
Weapons cycling


Does anyone know if it is possible to make a fighter fire his primary in a cycle?
So if he has 4 guns (total) then it would first fire from the first barrel, then the second, then third, then fourth, and then again....

The question is - cycle in a slot or all guns cycle?


If cycling were to be done...I would figure per slot...anything more and you have the potential for really slow fire rates on weapons that should fire quickly.
Title: Primary fire cycle?
Post by: TrashMan on April 30, 2003, 05:55:22 pm
A weapons flag? That way slower weapons use cycling, while faster ones don't (If you don't want to):D
Title: Primary fire cycle?
Post by: IceFire on April 30, 2003, 06:58:45 pm
Quote
Originally posted by TrashMan
A weapons flag? That way slower weapons use cycling, while faster ones don't (If you don't want to):D

Uncessary complication.

Simple solution, "cycle" in the weapon slot tells FS2 that the weapon should cycle within its slot (if a ship has 4 guns then 1, 2, 3, 4 will be fired - or 1, 3, 2, 4 may be better) .  Not affecting other weapons that may be non-cyclic.
Title: Primary fire cycle?
Post by: StratComm on April 30, 2003, 07:39:36 pm
The idea behind cycling weapons, at least in a game like this, is to increase the rate of fire of an otherwise slow-firing weapon.  Using the four turret example, if you had cycling on, the weapon would fire 4x faster but only one shot would be fired per burst.  However, with cycling off, four shots (4x damage) would be fired at normal speed (1/4th the speed of cycling on).  The problem with designing a weapon like this, as I see it, is that with cycling the delay between shots must be inversely proportional to the number of banks, so that each bank fires a shot as slowly as the weapon would normally fire.  This seems like a setting the player may want under his control, so that he could, say, link all shots together into one burst or cycle to increase rate of fire.

On a side note, missiles already do this, so perhaps some code could be adapted from there.
Title: Primary fire cycle?
Post by: Bobboau on April 30, 2003, 08:18:36 pm
I've got it working
Title: Primary fire cycle?
Post by: Galemp on April 30, 2003, 08:52:09 pm
YAAAAY!!!

*wants a pulsing Microwave Cannon on his Ulysses*
Title: Primary fire cycle?
Post by: kasperl on May 01, 2003, 03:48:13 am
Quote
Originally posted by Bobboau
I've got it working


how? and by key binding or not?
Title: Primary fire cycle?
Post by: TrashMan on May 01, 2003, 10:17:54 am
COOL! I want that!

Now if someone could get the barreld turrets to actually fire from all barrels (in salvos or cycle) and I'm a happy man! :D
Title: Primary fire cycle?
Post by: Bobboau on May 01, 2003, 10:23:08 am
well I set it up as a table flag, but I guess I could try to get it hooked into a key binding also, but I think that would require a diferent weapons flag
Title: Primary fire cycle?
Post by: Galemp on May 01, 2003, 11:15:32 am
Nah, keep it as a weapons flag. The FS weapons need more variety in them, and this is a big step towards that. Making it avaliable for every weapon would lessen the novelty of having it only on specific weapons.
Title: Primary fire cycle?
Post by: TrashMan on May 01, 2003, 02:34:41 pm
Quote
Originally posted by TrashMan
Now if someone could get the barreld turrets to actually fire from all barrels (in salvos or cycle) and I'm a happy man! :D
Title: Primary fire cycle?
Post by: Bobboau on May 01, 2003, 07:28:47 pm
well I was thinking of haveing a wepons flag that said it could cycle and a seperate one that meant that you could chose to have it cycle or not
Title: Primary fire cycle?
Post by: TrashMan on May 02, 2003, 10:21:01 am
:D
Title: Primary fire cycle?
Post by: Rampage on May 03, 2003, 10:39:53 am
Nice!  Now I can make vulcan cannons!
Title: Primary fire cycle?
Post by: Raptor on May 04, 2003, 03:02:26 am
I should mention this, as it's kinda related....

Yesterday, while messing around with a small warship model, I created a player flyable version. It had the same beam weapons as the warship, including the players primary gun bank (I turned two of the turrets into the gun bank).

I was hoping that the beams would 'Lock on' to the target, ala BGreen style.  They didn't, BUT the beam cycled between the firing points!:eek2:

This is with FS2_open 3.5

BTW, cylcing primary pluse cannons would be VERY cool!:yes:
Title: Primary fire cycle?
Post by: ZylonBane on May 04, 2003, 04:46:25 pm
I'd rather cycling were available on all weapons, not just some. There's no logical reason for any weapon to be incapable of ripple firing, as each gun is an independent unit.

This has been discussed at length in other threads already anyway.
Title: Primary fire cycle?
Post by: Nuke on May 05, 2003, 10:07:54 pm
here is how i want the weapons flag to work, woy add this to a weapon entry:

$cycle

after that you add the number of guns that may fire at once so it looks like this:

$cycle    2

this means that 2 guns will fire at once and then the next 2 fire the next shot, it gives the modder more flexability. if you want all guns to fire, omit the tag or set it to -1. if your ship only has that number of guns then it will fire all of them, if the number of guns is less than the cycle number, it will scale up the fire rate accordingly. if its set to 4 and you only have 2 guns, fire rate then doubles.

i also want deflection angles!
Title: Primary fire cycle?
Post by: Nuke on May 05, 2003, 10:41:39 pm
the only reason i want alternating guns is for artistic purposes.

i really want descent3 style gun alternating, but that would require severe alterations to the pof format among code changes.
Title: Primary fire cycle?
Post by: TrashMan on May 06, 2003, 05:09:29 am
That's all nice ad well, but did anyone managed to get multi-barreld turrets to cycle? Or to fire in a salvo (from both barrels)