Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on March 30, 2015, 01:01:21 pm

Title: How do we lead fighterbeams right now?
Post by: General Battuta on March 30, 2015, 01:01:21 pm
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?

Thanks for being so cool, SCP!

Title: Re: How do we lead fighterbeams right now?
Post by: Spoon on March 30, 2015, 01:22:17 pm
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?
From experience I can tell that mixed beam-projectile weapons on ai fighters don't mix well. It will lead the target, and thus miss every beam shot. I'm not 100% if there is any difference in what bank the weapon is in. Ergo, it might pick the lead indicator of the first gunbank it has and aim with that. Need confirmation on that.

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?
Yup, it uses velocity*life time to create the lead point, even for beams.
Title: Re: How do we lead fighterbeams right now?
Post by: General Battuta on March 30, 2015, 01:25:21 pm
Mah cutlery
Title: Re: How do we lead fighterbeams right now?
Post by: AdmiralRalwood on March 30, 2015, 01:25:34 pm
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?

Thanks for being so cool, SCP!


Based on what I remember of the relevant code from investigating Mantis 3147, both the AI's primary leading and the HUD's leadpoint are probably using the weapon's "$Velocity:" without regard to the fact that it's not actually a projectile. As a workaround, you can set the weapon's speed to something really high (along with decreasing mass to avoid massive knockback), but the code should probably be changed to account for beams.

As for fire-linked primaries, the AI makes no attempt to account for that when aiming. Whichever bank is considered "current" is the one it uses for aiming; not sure which bank that's going to be (it depends on whether or not smart weapon switching is enabled, and if so, which weapon it considers most effective against the current target; otherwise, it'll be the first bank).