fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Add good-primary-time SEXP

Open plieblang opened this issue 7 years ago • 1 comments

This allows FREDers to have more control over which primary weapon the AI uses. The arguments to the SEXP are the object mounting the weapon, the weapon name, the target object and a number used as a boolean which turns the overriding on or off. The object arguments can be any combination of ship, wing or team. I implemented this by mapping the object signatures for all possible pairs of subject (the ship mounting the weapon) and target ships that were specified in the SEXP to the weapon. When selecting a primary, the AI checks if it and its target are one of these pairs, and if so selects the bank with the weapon if available. When active, the AI also can't link primaries, since this might go against what the FREDer wants. I implemented this with a new ship flag.

plieblang avatar Jan 07 '19 18:01 plieblang

Will take another look later. I am a little bit skeptical about the implementation, so I'll have to think about that, but I really like the concept. If this works well, I recommend extending it to secondaries as well, because the current good-secondary-time is very minimalist.

Goober5000 avatar Jan 12 '19 21:01 Goober5000

Closing in favor of #5565

Goober5000 avatar Aug 20 '23 03:08 Goober5000