Modding, Mission Design, and Coding > The Scripting Workshop

Fighter Beam force fire


So, I just picked back up on a thing I was working on that I completely forgot about, and I know why I forgot about it.  :ick:

But instead of bumping that thread: << read this first plz I am making a new one. 

Long story short, workaround did not work as intended, so I'm going back to Plan:A.

I now know what the problem is, this script:

--- Code: ---#Conditional Hooks
$Application: FS2_Open
$On Game Init:

function FireAllPri(shipname)

local ship = mn.Ships[shipname]

if ship:isValid() then

for i=1, #ship.PrimaryBanks do
local thisBank = ship.PrimaryBanks[i]

if thisBank:isValid() then
thisBank.Armed = true




--- End code ---

dose not work if the weapon in question is a Fighter-mounted beam.  (Type-2 as marked in the table files)

If there are any scripting-wizes who understand the intricacies of beam weapon code out here, I could really use your help.

TL;DR I need a way to force fighter-mounted beams to fire.

The code for the firePrimary function should handle beam weapons but I'm not sure what exactly is required to make them work correctly. Do you have some kind of test mod I could try this out with? Fighter mounted beams are pretty rare so it's not easy to find a mod to test this with.

Soooo, uhh, I was making the test mission, and I discovered that apparently this problem no longer exists,  :wtf:

I did some experimentation, and sometime between build: 3_7_5 and 3_8_0 It just started working.

I don't recall anyone having this issue before, so I do not think this was fixed knowingly. . .  (code be like that)

Granted I did run into a completely unrelated problem now, so there's that. . . .

since this thread is only 3 posts, if I need help I will just change the thread title and start from there. .

Thanks anyway tho  :D

I don't remember any changes to that function but I'm not going to complain about something that was fixed :p

It might have been caused by a different bug that got fixed, but without knowing exactly what version it got fixed in, trying to track it down would be virtually impossible (but hey, it's working, so nobody needs to find out when it got fixed :P).


[0] Message Index

Go to full version