Page 1 of 1

[Q] Strike Mission Target list

Posted: Wed Sep 23, 2026 8:12 pm
by Knightpawn
(background: the "trigger' for this question was an answer in the Tech forum)

How would one trigger a strike mission upon detection of a certain type of unit AND at the same time limit the possible targets of the activated mission to certain type of units?

In other words (as an example):
Active naval strike mission X if and only if a carrier or DDG is detected and in this case put on the target list only carriers, DDGs and Frigates

Re: [Q] Strike Mission Target list

Posted: Thu Sep 24, 2026 8:45 am
by Lakeend
You can create a broad unit detected trigger, then as lua condition script use unitC() function ( https://commandlua.github.io/assets/Fun ... UnitC.html) and check if its a eg. carrier, then as Action enable your strike mission and AssignUnitAsTarget(https://commandlua.github.io/assets/Fun ... arget.html).

If this was what you were asking?

Re: [Q] Strike Mission Target list

Posted: Thu Sep 24, 2026 8:52 am
by Knightpawn
Lakeend wrote: Thu Sep 24, 2026 8:45 am You can create a broad unit detected trigger, then as lua condition script use unitC() function ( https://commandlua.github.io/assets/Fun ... UnitC.html) and check if its a eg. carrier, then as Action enable your strike mission and AssignUnitAsTarget(https://commandlua.github.io/assets/Fun ... arget.html).

If this was what you were asking?
Thanks! I will try it

Re: [Q] Strike Mission Target list

Posted: Thu Sep 24, 2026 10:50 am
by Knightpawn
Lakeend wrote: Thu Sep 24, 2026 8:45 am then as Action enable your strike mission and AssignUnitAsTarget(https://commandlua.github.io/assets/Fun ... arget.html).
Does sequencing of nested action under a trigger matter? Do they get executed top to bottom? To my mind i should probably first assign targets and the activate. Or is it irrelevant?

Re: [Q] Strike Mission Target list

Posted: Thu Sep 24, 2026 12:47 pm
by Lakeend
Knightpawn wrote: Thu Sep 24, 2026 10:50 am
Lakeend wrote: Thu Sep 24, 2026 8:45 am then as Action enable your strike mission and AssignUnitAsTarget(https://commandlua.github.io/assets/Fun ... arget.html).
Does sequencing of nested action under a trigger matter? Do they get executed top to bottom? To my mind i should probably first assign targets and the activate. Or is it irrelevant?
If its question of action sequencing, best to put them all to same lua action script and handle sequencing there?