Need help with ScenEdit_AttackContact
Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command
-
- Posts: 64
- Joined: Tue Jun 28, 2022 1:55 am
Need help with ScenEdit_AttackContact
Hello , i need some help on how to attack a ship with exocets using ScenEdit_AttackContact . I 've made it work without waypoints and it hits the target and i ve made it work with 'BOL' and waypoints but it doesn't hit the ship. Is there a way to not use 'BOL' and still add waypoints?
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
You can't do it unless using BOL, and the course you feed doesn't exceed range in total legs, also it was mentioned that course be accepted for non-bol launches years ago, never fixed\addressed to my knowledge and I never successfully got it to work in any mode. (this is all in 1147.xx, idk about the newer betas)
BTW the return value often comes back true when it actually fails to allocate most the time too.
related though not directly:
https://www.matrixgames.com/forums/view ... &hilit=BOL
BTW the return value often comes back true when it actually fails to allocate most the time too.
related though not directly:
https://www.matrixgames.com/forums/view ... &hilit=BOL
-
- Posts: 64
- Joined: Tue Jun 28, 2022 1:55 am
Re: Need help with ScenEdit_AttackContact
So how do you hit a moving target with BOL? I've set it so the aimpoint as close as it can be to the normal targeting mode but the missile just crashes there , it doesn't activate it's sensors .
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
You don't really, or you can in theory manipulate the missile's course post launch.. which now is possible in the beta now that waypoint types can be set (it was b4 too but you had to be careful to leave the special stuff alone and only change\add nav waypoints before all the other stuff), but is still a pita, and also requires near constant tracking\scanning to trap for\ detection of the launch of said new missiles, appearing with a parent to the launching unit. Sounds like you tried this recently (it kinda used to work in 1147.2x-4x time frame with lrsam158c's last I was playing around with it, but thing may have changed modeling since then... *shrugs* maybe I was just getting lucky with how the seekers were working back then)
Best we just ask for a feature enhancement to AttackContact() - that the course param be evaluated/used for modes 1 and 2 regardless of 'BOL' or not, so long as the weapon is waypoint capable.
Best we just ask for a feature enhancement to AttackContact() - that the course param be evaluated/used for modes 1 and 2 regardless of 'BOL' or not, so long as the weapon is waypoint capable.
-
- Posts: 64
- Joined: Tue Jun 28, 2022 1:55 am
Re: Need help with ScenEdit_AttackContact
Yes , how do we do this?KnightHawk75 wrote: Tue Jan 17, 2023 7:20 am You don't really, or you can in theory manipulate the missile's course post launch.. which now is possible in the beta now that waypoint types can be set (it was b4 too but you had to be careful to leave the special stuff alone and only change\add nav waypoints before all the other stuff), but is still a pita, and also requires near constant tracking\scanning to trap for\ detection of the launch of said new missiles, appearing with a parent to the launching unit. Sounds like you tried this recently (it kinda used to work in 1147.2x-4x time frame with lrsam158c's last I was playing around with it, but thing may have changed modeling since then... *shrugs* maybe I was just getting lucky with how the seekers were working back then)
Best we just ask for a feature enhancement to AttackContact() - that the course param be evaluated/used for modes 1 and 2 regardless of 'BOL' or not, so long as the weapon is waypoint capable.
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
Often michaelm (one of the devs) sees us talking about it, and if concurs, puts it on his official or unofficial todo list and lets us know. 
But..I've asked via the ScenEdit Requests thread as well (https://www.matrixgames.com/forums/view ... 5#p5069615 ). Between that, the tech support thread and this one chances are someone will see it and it may add it to the 'todo list'.

But..I've asked via the ScenEdit Requests thread as well (https://www.matrixgames.com/forums/view ... 5#p5069615 ). Between that, the tech support thread and this one chances are someone will see it and it may add it to the 'todo list'.
- michaelm75au
- Posts: 12457
- Joined: Sat May 05, 2001 8:00 am
- Location: Melbourne, Australia
Re: Need help with ScenEdit_AttackContact
I will have a look at this, but the course setting can only be applied to mode 1 attacks. When mode 2 is used, the logic is under the control of the AI and there is no 'salvo' to update yet.
Michael
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
Just fyi this has been added in 1.05 b1307.1+, thanks again.

* TWEAK: [Lua] SE_AttackContact:
1. Allow course setting in mode 1
2. If no mount specified, use first one with appropriate weapon DBID.
Re: Need help with ScenEdit_AttackContact
Hello. I have been following along with this thread as it is also something I am interested in. What is the syntax for the course via waypoints in the SE_attackcontact script? Do we still need to add 'BOL' as the target GUID and the position of the aimpoint? Thanks.
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
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..
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)
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.');
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
Just quoting you so you get notified of syntax, forgot to do in original post, don't think edits trigger it.
-
- Posts: 64
- Joined: Tue Jun 28, 2022 1:55 am
Re: Need help with ScenEdit_AttackContact
did you try different keys? maybe they changed the mount to mount_dbid or mountid or something when they reprogrammed itKnightHawk75 wrote: Sun Jan 29, 2023 8:41 am
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![]()
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
I did try mountid and mountdbid, and as string, didn't work either and newer doc and release notes say mount, so tend to doubt that changed, but never know.DimiHendrix wrote: Sun Jan 29, 2023 3:37 pmdid you try different keys? maybe they changed the mount to mount_dbid or mountid or something when they reprogrammed itKnightHawk75 wrote: Sun Jan 29, 2023 8:41 am
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![]()
- michaelm75au
- Posts: 12457
- Joined: Sat May 05, 2001 8:00 am
- Location: Melbourne, Australia
Re: Need help with ScenEdit_AttackContact
The 'mount' is the mount DB id, rather than a specific mount GUID. Not sure why I picked DBID rather than the mount GUID.
If you are using a 'loadout', the 'mount' does not count.
If you are using a 'loadout', the 'mount' does not count.
Michael
-
- Posts: 1850
- Joined: Thu Nov 15, 2018 7:24 pm
Re: Need help with ScenEdit_AttackContact
Yeah I know that's what I've been trying, the mount's dbid, even on ship it's seems to ignore with aforementioned syntax it in 1307.1michaelm75au wrote: Sun Jan 29, 2023 6:58 pm The 'mount' is the mount DB id, rather than a specific mount GUID. Not sure why I picked DBID rather than the mount GUID.

- You probably did it to make it easier for 'most', so people didn't have to do their own lookups first.
If you are using a 'loadout', the 'mount' does not count.

