I've mentioned this a couple time in various threads but keep forgetting to put in here in the more specific \ official('ish) one.
LUA - An added function or method for disengaging | disengaging-all upon a unit, such as exists in the GUI. This would compliment the ScenEdit_AttackContact() function.
Something like the following (just possible suggestion\example):
-- (side and unitname) | guid = These params function same as most functions for lookup. id's the unit to operate on.
-- contacts= Table of string names or guids of the contact wrapper(s) from unit's side perspective which to drop engagement on.
-- or could just make it only take a single string value per call.
-- [dropall]= If true ignores contact field and just drop's all engagements the unit has.
OR perhaps a method on the unit wrapper
-- second parameter optional defaulting to false.
There are cases (and not obscure ones) where scene designers\script authors need a simple, non side-effect inducing way to issue a break engagement\current orders command to a unit. Even if if the system in some cases may automatically re-engage the unit a second or two later under some cases this function would be incredibly valuable to have available for all primary unit classes (perhaps including weapons) to at least temporarily stop what they are presently doing and reset their logic cycle. It's especially needed on the ground unit side, where there is no "base" assignment, such that an often used workaround for the lack of this feature is the use of "rtb" (despite some side affects, or other trickery), which doesn't apply there.
Also, ideally when doing a "drop all" besides 'engagements' I think it should apply in a near blanket fashion to any significant current activity\order it is currently doing. Such as "dropping-off|picking-up|maneuvering to refuel|refueling|engagement|dog-fighting|early-landing cycle|etc. Again often even if the unit may re-trigger back to what it was doing on the next evaluation at a later point in time, the a provided momentary window to make needed changes to the unit or it's orders\missions\etc and influence behavior. Now ideally I would suggest a more broad IssueUnitOrder request were we could actually specify lots of different options like disengage|disengage-all|lay-chaft|drop-buoy-active-over|drop-buoy-passive-under,etc but that's much bigger lift i imagine for doing and testing. The above disengage specific request keeps things more simple (I think??) and can probably piggy back mostly on what exists already(gui option). If done on the unit wrapper, I don't think it would precludes some fictional broader command coming along at some point far away in the future.
< Message edited by KnightHawk75 -- 6/15/2021 4:40:02 AM >