Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Unassigning and Reassigning AI units to missions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Unassigning and Reassigning AI units to missions Page: [1]
Login
Message << Older Topic   Newer Topic >>
Unassigning and Reassigning AI units to missions - 6/11/2020 11:12:03 AM   
BHughes


Posts: 21
Joined: 5/12/2020
Status: offline
Hi there - a scenario designing query.

Is there any way to have a computer-controlled unit unassigned from a mission by a given trigger to then be available to be reassigned to a different mission? Query applies to both CMO and CMNAO. I'm trying to make the AI opponents behave in a bit more sophisticated manner over a multi-day scenario where certain assets need to perform both strike and CAP missions.

And whilst I'm at it, any methods of adjusting the fuel levels of surface/subsurface units? One workaround I can think of is to let the scenario run in editor and have the ships charge around for a few days and then reposition them to start locations and times, with suitably depleted fuel levels, but I was hoping to find a less onerous way of doing it! LAU scripts?

< Message edited by apache85 -- 6/12/2020 3:16:06 AM >


_____________________________

Post #: 1
RE: Unassigning and Reassigning AI units to missions - 6/11/2020 12:57:14 PM   
thewood1

 

Posts: 5731
Joined: 11/27/2005
Status: online
Probably should ask here:

https://www.matrixgames.com/forums/tt.asp?forumid=1681

This subforum is more for technical issues.

(in reply to BHughes)
Post #: 2
RE: Unassigning and Reassigning AI units to missions - 6/11/2020 6:42:40 PM   
KnightHawk75

 

Posts: 936
Joined: 11/15/2018
Status: offline
So on the first without LUA... idk maybe not, with Lua definitely, only a matter of what you want to do and what trigger fits what you're trying to accomplish. Post in LUA Legion area about the specifics and I'm sure you'll get pointed in the right direction.

On the second when it comes to setting ship fuel via gui, you can't.
However attached is a script, copy\paste the contents of SA_RefuelSelectedUnitsAskUser.lua into a Special Action, call it whatever you want and mark it active and repeatable, let you scenario editor environment move forward for ~1 second, the Special Action icon should appear, if was not already available.

To use, select any number of ships, grouped or not doesn't matter and then run the special action.
You will be shown the current contents of the ship's fuel stores, there can be more than 1.
Enter the type number you want to change.

Enter the amount you want that type set too.

..if you selected more than 1 unit it will repeat this process for each of them.
..if you hit cancel or a clearly invalid number or entry like not a number etc.. that unit will be skipped and you'll have to select it again and try again:


When it's done you should get a count of how many it actually touched (ie skipped are not counted).


Downsides at the moment is you can only change 1 type per unit at a time. Sorry I threw this together pretty fast.
You can also select aircraft, but if has more than 1 drop tank I skip it to avoid a problem, use the gui instead for those. I included another in the zip that refuels anything you select to max on all types, in case you need it as well, or if not no harm done.




Attachment (1)

(in reply to BHughes)
Post #: 3
RE: Unassigning and Reassigning AI units to missions - 6/25/2020 3:24:23 PM   
BHughes


Posts: 21
Joined: 5/12/2020
Status: offline
Thanks very much for the feedback, and sorry for the delay in responding! I'll be putting this to work in the next scenario!

_____________________________


(in reply to KnightHawk75)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Unassigning and Reassigning AI units to missions Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.156