Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Polpolion on July 01, 2007, 11:44:25 am

Title: turrets that attack only bombs
Post by: Polpolion on July 01, 2007, 11:44:25 am
Is there any flags that make turrets or weapons do this or anything?
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 01, 2007, 12:33:08 pm
You could all 'small only' flag to weapon. It should force it to target only fighters/bombers and bombs.

And in any case.. All turrets - unless otherwise specified - prioritize bombs
Title: Re: turrets that attack only bombs
Post by: Polpolion on July 01, 2007, 12:39:47 pm
Would it be possible to have normal turrets only shoot non-missiles, and these guns only shoot bombs? Because I am trying to have dedicated anti missile systems for my mod. Or would this require creating a flag and stuff like that?

Also, how much HP do missiles have? is it just one?
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 01, 2007, 12:51:07 pm
Missiles do not use normal collision detection, they die from a single shot that hits 'close enough' (fixed radius).

And turrets can be set to 'avoid' targetting bombs (via sexps - so they would prioritize bombs last after anything else) or to avoid targetting bombs and small craft alltogether ("huge")
Title: Re: turrets that attack only bombs
Post by: Polpolion on July 01, 2007, 12:52:38 pm
Okay, thanks. :)

EDIT: Exhaust. Exactly how does this work? It's not in the wiki, to my knowledge
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 01, 2007, 02:12:39 pm
Umm.. which one?
Title: Re: turrets that attack only bombs
Post by: Polpolion on July 01, 2007, 02:18:12 pm
Assuming that there is only one kind that has to do with the missiles, that one. Otherwise, never mind.

On the Trail portion of a missile's tbl entry, it says something like "ignore if exhaust is set". That one.
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 01, 2007, 02:31:55 pm
I think that is just a note. It is irrelevant. Missile can have both particle and normal trails
Title: Re: turrets that attack only bombs
Post by: karajorma on July 01, 2007, 02:41:25 pm
And turrets can be set to 'avoid' targetting bombs (via sexps - so they would prioritize bombs last after anything else) or to avoid targetting bombs and small craft alltogether ("huge")

Wasn't there a problem with beam turrets firing at bombs if nothing else was around?

Cause if so wouldn't giving a ship "small only" and "huge" mean that bombs were the only things left?
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 01, 2007, 02:50:43 pm
There is a problem with any (huge and non-huge) weapon and bombs.. like heavy beams and bombs fired from turrets.. Both are used to intercept enemy 'bombs'. And not 'if nothing else was around' but rather 'prioritize over all other targets' which causes the possibility to 'jam' hostile capships heavy turret weapons just by firing bomb tagged weapons on its firing arc unless either ai_profiles or very strict missions scripting (fredding) is used.

Possibly.. i dont how those flags work in the code though. If they were similar to simple logic operators then it would be so but they might as well override each other.. (got to check though).

EDIT: Checked... At least there is a warning popping up.. though it doesn't mean it wouldn't possibly target bombs... well.. if ai_profles is used to prevent huge weapons from targetting bombs then it wont target anything.

Code: [Select]
if ((weaponp->wi_flags2 & WIF2_SMALL_ONLY) && (weaponp->wi_flags & WIF_HUGE))
{
Warning(LOCATION,"\"small only\" and \"huge\" flags are mutually exclusive.\nThey are used together in %s\nAI will most likely not use this weapon",weaponp->name);
}
Title: Re: turrets that attack only bombs
Post by: karajorma on July 01, 2007, 05:06:13 pm
I suspect if that warning was commented out then the game would basically only target bombs. But I'd need to look in a lot more detail before that would be anything other than a hunch. :)
Title: Re: turrets that attack only bombs
Post by: TrashMan on July 01, 2007, 05:09:21 pm
So there's another feature for the new SCP.... "bomb_only" flag for weapons
Title: Re: turrets that attack only bombs
Post by: Wanderer on July 02, 2007, 01:20:33 am
Why bother? Any current anti-missile system is also used for close defense against aircrafts (or other small craft). Basically exactly same as the 'small only'.

They still prioritize the bombs over fighters so they act mainly as 'anti-bomb' weapons in any case. Cant really see any use for the 'bomb only' flag