December 21, 2024, 19:35:26

Author Topic: Staggering weapon firing  (Read 12334 times)

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Staggering weapon firing
« on: August 21, 2010, 20:15:16 »
Hey all, just wondering if it's possible to make different kinds of firing solutions on weapons. So lets say a ship has 8 turrets of one weapon type and you choose "destroy hull" - right now they all fire at the exact same time. Is there a way to change that, or create a new weapon function button, that staggers the firing, so there's like a quarter second delay between each weapon firing?

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #1 on: August 21, 2010, 22:21:56 »
the easiest solution to that problem would be to create different weapon types, for example: Railgun I,II,III etc, each one of them with an slightly different loading time, probably something less than a second (for example, the railgun I takes 10'' to load, the II takes 10.5, the III 9.3, the IV 11, and so on)

Either that or you could build an script that would delay the shots manually and produce that effect, although I strongly recommend you choose always the simplest solution to a problem.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #2 on: August 21, 2010, 23:47:18 »
Yeah, easier is always better, just wanted to know which it would be. :)
Thanks.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #3 on: August 23, 2010, 02:20:15 »
The only thing I dislike about this is what if you decide to manually fire the guns, the slower guns are always going to be that much slower, which is kind of silly. But I guess that's just one more limitation of Nexus :P

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
(No subject)
« Reply #4 on: August 23, 2010, 21:36:27 »
Not necessarily. If you choose to put it in code, you can put a random loading time for every cannon of the same type that is loading again after it has fired.

Or else you sort of create a loading time list for every single one of this particular type of guns when firing begins.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #5 on: August 24, 2010, 02:05:14 »
Perhaps, but that's well beyond my knowledge to do, or anyone else on our team, for that matter. For the time being at least, I'll just be going with the multiple-cannon offset approach.

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #6 on: August 24, 2010, 06:40:04 »
Playing on the idea I suggested recently in the thread about extra weapon slots, perhaps you could have 'batteries' of weapons, with each weapon in the battery having a slightly different firing time and using a machine to make the invisible ones fire on the same target as the 'parent' system? Though that would mean each parent weapon system on a given ship would have to have a unique devicetype...

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #7 on: August 24, 2010, 18:38:37 »
The code that would allow the staggering fire won't be too hard to make, but if there's an other solution that can work pretty much as good as it, then the best way is to go with that one, it'll make your mod more solid and bug-free. Besides, the difference is not that great, most wouldn't even notice it.

Offline The Old Dragon

  • Ensign
  • ***
  • Posts: 362
  • Karma: 6
    • View Profile
    • http://
(No subject)
« Reply #8 on: August 25, 2010, 01:26:18 »
Quick question, does anyone know if it's possible to check whether or not a a ships target is within a specific weapons fire arc?
Better to look the fool by asking, then prove them right with ignorance.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #9 on: August 25, 2010, 03:23:58 »
uhm... I don't think something quite that expecific exists... the closest thing that comes to mind is the  obj:tRequestShipInRangeEvent(range, mode); commands that enables the CO_ShipsInRange event, or just ask for the distance between two ships.

Offline The Old Dragon

  • Ensign
  • ***
  • Posts: 362
  • Karma: 6
    • View Profile
    • http://
(No subject)
« Reply #10 on: August 25, 2010, 08:38:27 »
Not quite what I was thinking.  My thought was, if we can detect which weapons have a viable firing solution to the main target then those weapons could be listed. With that done, a small script could randomly pick and  fire those weapons one at a time with a small (again random) delay between them.
Better to look the fool by asking, then prove them right with ignorance.