Looks like it might still not be working right in 1307.1
The mode='1' course table stuff does work now ...
However I can't seem to control which mount is used for it, even if you supply it with a valid mountdbid it seems.
That or maybe it's not a number or I'm doing something wrong, or doc has param name wrong? haaalp
Wish we could actually control this better, cause often I want to fire from loadout first, then extra mounts on an aircraft, also I can think times where I want to fire on very specific mountguid not the mountdbid on ship or sam (due to how their reload settings might be set differently), but anyway testing with mount=# doesn't produce expected result atm.
I was thinking (mode1) could maybe in future:
Where mount==nil |not provided = use first weaponid found as is...mount\loadout whatever...
Where mount==0 = Use loadout ONLY or fail if not qualified wpn id or no loadout (ie for use with aircraft only).
Where mount >0 use matching mountdbid with wpn id available first...or Only.
Where mountguid= provided, search and use that specific mount only.
But I get I might be asking for too much with the mountguid, but it would be nice if we could force it to use mount in question if specified, and force it to use loadout if mount is specified but ==0 and unit has a loadout (aircraft).
Sample attached relating to how to use the course, but also shows in special actions the ship and aircraft trying to launch from specified 3017 mount and it failing to do that, it either shares the load between mounts and loadout (agm-158c) or in the case of the ship doesn't use the mount in question for the 109I's from mount 3107 but others first.
For person wanting example..
Code: Select all
local contact = {name='Marker (City)', guid='4FH7PU-0HMO19F87FNHB'};
local attacker = {name='B-1B Lancer', guid='4FH7PU-0HMO19F87FN72'};
local attackership= {name='DDG 1000 Zumwalt', guid='4FH7PU-0HMO1NKCF659K'};
local wpcourse = {
[1]={latitude='30.6229440286427', longitude='-88.3854775982652'},
[2]={latitude='32.027458493546', longitude='-86.9690108643612'},
[3]={latitude='32.7422120583297', longitude='-87.7987230026505'}
}
local wpcourse2 = {
{latitude='31.536413360538', longitude='-88.2453582135071'},
{latitude='32.8480913652107', longitude='-87.6247580081409'}
}
--1307.1 specific
--assumes ooda is cleared etc.
-- Manual Allocation (mode=1) against the city from aircraft with extra mounts AGM-158C's.
-- Launch without using a mount...fires salvo from both loadout and mount.
local retval = ScenEdit_AttackContact(attacker.guid,contact.guid, qty=2, mode='1',weapon=2378, course=wpcourse});
print(retval); --false is it didn't take for whatever reason, true is alleged success.
--launch specifically from extra mount fails to do that but does launch like above.
local retval = ScenEdit_AttackContact(attacker.guid,contact.guid, {qty=2,mode='1',mount=3017,weapon=2378, course=wpcourse2});
print(retval); --false is it didn't take for whatever reason, true is alleged success.
-- Manual Allocation (mode=1) against the city from ship with extra mount 109I's.
--launch from any mount.. expected outcome kinda, doesn't seem to alternate mounts like aircraft ...whatever
local retval = ScenEdit_AttackContact(attackership.guid,contact.guid, {qty=3,mode='1',weapon=2941, course=wpcourse1});
print(retval); --false is it didn't take for whatever reason, true is alleged success.
--launch specifically from extra mount fails to do that but from mk57's instead of mk41.
local retval = ScenEdit_AttackContact(attackership.guid,contact.guid, {qty=3,mode='1',mount=3017,weapon=2941, course=wpcourse2});
print(retval); --false is it didn't take for whatever reason, true is alleged success.
print('done.');
Sample scene 1307.1 db3k498a (special actions that basically dupe the above; remember to refill mounts\loadout in question between trying each line so you can see what I mean about mount param seemingly not working)