Page 1 of 1

Targetting a location (not a contact)

Posted: Wed Mar 10, 2021 10:16 am
by jkgarner
OK,
In the documentation (under Event Handling, I found the following:
TargetType
Aircraft 1
Ship 2
Submarine 3
Facility 4
Aimpoint 5
Weapon 6
Satellite 7
This applies to the target filter, but it got me thinking...

Sometimes an artillery unit (for example, but cold be a ship) will shell a location (lat/lon) or an area and not a specific contact.

Granted this is not as common as it was before expensive smart-weapons, but it is still done possible and it is still done.

I am not seeing how to get units to behave this way in Command, either through the GUI, or scripting Lua. It's possible that I missed something somewhere, or the documentation is not quite complete.

Does anyone have any ideas on how to do this: get a unit to target a location- or aim-point and not a contact. (hint: Lua would be preferred)

RE: Targetting a location (not a contact)

Posted: Wed Mar 10, 2021 1:22 pm
by KnightHawk75
Only been able to do with attackcontact, when trying to do lat\lon's I usually just fake with add_exposition and removing munitions from those I pretend-launch'em from.

RE: Targetting a location (not a contact)

Posted: Wed Mar 31, 2021 5:41 am
by tiag
You can simulate an attack to coordinates by adding a marker via LUA. In CMO there are 3 of them you can use: Bombing Target, Target and Training Target.
For each unit I want to attack a coordinate, I add one of these markers and make the corresponding unit to attack it. Baseline, I am attacking a "contact" (=marker), but my unit /AI moves it via LUA that marker around according to its logic.

An example of use:
I plan a naval assault to a beach. I know there are enemy units hidden on the terrain but I cant see them. So, my ships generate these markers following some logic and start firing at thes markers.

Hope it helps.