KnightHawk75
Posts: 1450
Joined: 11/15/2018 Status: offline
|
quote:
Is there a way for the AI side to change the mission and loadout after a scenario has begun without the player manually switching sides to do so? Yes, one can change the mission assignment of a unit at any time, and if the circumstances are right the assigned loadout as well. quote:
For example: I have F/A-18s on a CVN. I want them to be able to swap to an AGM-84E loadout and launch an ASUW Strike / Patrol at a certain time Sure, combine a specific time trigger with a little lua to make the loudout swap, adjust readytime, and make the mission assignment, alone with activating the mission involved. quote:
(or should any enemy fleet be detected) from a CAP mission A2A loadout. One can trigger actions on detection, but one might have to build their own layer for what determines a 'fleet', could be simple, could be nearly as complex as one wants to spend time making it. quote:
Another example would be the ability for units to swap Strike targets after the first has been prosecuted. Possible yes, but more involved than things like the first. quote:
For example: I have Su-34s loaded with anti-runway ordnance. They successfully strike one base, disabling its runway. But then I'd like them to switch to the next runway at another base without striking the first base again. To do this reliably often you will have to first detect the state of object which you can do (either via damage or destroyed triggers, though in the case of a runway or RAP damage is the way - short of nukes being involved cause they don't actually get destroyed). Then assuming the condition(s) is met, push a mission unassignment(this will temporarily clear it's targets),adjust unit doc\wra for what you need,assign new target via lua, and it should then attack that target. Then you'll want to watch for it's status or/and the status of the target. If destroyed or say your unit is out of ammo and you want do what you need with it...put it back into a strike package/patrol, rtb it, move it to the next target etc. It can be done, but it's more work then you think it is the more intelligent you try to make it. Another option on a small scale that works is lots of strike missions, each with a singular target, and as things get destroyed or otherwise detected in a state where one doesn't want it targeted anymore, move units from mission to mission as the various conditions are met, they could be pre-generated or lua generated. I know some of folks even for non-ai sides use the single target per strike mission method - pita but it works out most the time. Video tuts.. there are more around I'm sure but see the links here: https://www.matrixgames.com/forums/tm.asp?m=3784722 They aren't going to teach you to do all the things you might need, but they will give you a feel for the basics.
< Message edited by KnightHawk75 -- 12/7/2021 6:36:19 PM >
|