Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: OverKill on November 17, 2009, 04:20:40 pm

Title: A function that increases a turrets $FOF based on target speed
Post by: OverKill on November 17, 2009, 04:20:40 pm
Is it possible to set/script a turret to increase its $FOF to a set amount based on the targets its tracking speed?

For example
Fighter standing still $FOF:0
Fighter going 20 $FOF: 0.2
Fighter going 40 $FOF: 0.4
and so on.

And possibly using other functions that linear so that the targeting systems would lose more accuracy at higher speeds and less at lower speeds.

it would be cool if we could set a parameter like this in the weapons tables.
Thanks to that we could make some weapons really lethal when going slowly and for slower bombers, and at the same time, high speed interceptors would have a bigger chance to dodge incoming fire.
Right now its either a dumb miss-all most of the time turret even when you are standing still right next to it, or godlike accurate rape-laser.
It would encourage going fast.
Title: Re: A function that increases a turrets $FOF based on target speed
Post by: Sushi on November 17, 2009, 04:48:55 pm
Is it possible to set/script a turret to increase its $FOF to a set amount based on the targets its tracking speed?

For example
Fighter standing still $FOF:0
Fighter going 20 $FOF: 0.2
Fighter going 40 $FOF: 0.4
and so on.

And possibly using other functions that linear so that the targeting systems would lose more accuracy at higher speeds and less at lower speeds.

it would be cool if we could set a parameter like this in the weapons tables.
Thanks to that we could make some weapons really lethal when going slowly and for slower bombers, and at the same time, high speed interceptors would have a bigger chance to dodge incoming fire.
Right now its either a dumb miss-all most of the time turret even when you are standing still right next to it, or godlike accurate rape-laser.
It would encourage going fast.

If you use $Max Aim Update Delay in an AI class, you can make the AI more accurate against targets flying in a straight line and less accurate against targets actively dodging and weaving.
Title: Re: A function that increases a turrets $FOF based on target speed
Post by: OverKill on November 17, 2009, 05:19:28 pm
does that work on capital ships?
it would be better if we could use it on a per weapon basis, because this way the whole ship would have impaired targetting.
Title: Re: A function that increases a turrets $FOF based on target speed
Post by: Sushi on November 17, 2009, 11:31:21 pm
does that work on capital ships?
it would be better if we could use it on a per weapon basis, because this way the whole ship would have impaired targetting.

Well, I haven't tested it on capships, but in theory it should. :)

Also, you can give every turret a separate AI class in FRED, but it's not clear at the moment whether that actually does anything in the game or not...