Either/Or for unit spawns possible?

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
MarkJoergensen
Posts: 36
Joined: Tue Sep 21, 2021 12:58 pm

Either/Or for unit spawns possible?

Post by MarkJoergensen »

Hi there,

Is it possible to do make a scenario where a set of units either spawn in location X or spawns in location Y, with the same strike mission already attached to them? For instance, the squadron either spawns at an airfield near Kaliningrad or St. Petersburg, with a naval strike mission already assigned and ready to go?
Parel803
Posts: 948
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Re: Either/Or for unit spawns possible?

Post by Parel803 »

I'm no expert but you might find stuff in the Lua Legion part. Or get answers from smart Lua people.
regards GJ
thewood1
Posts: 10272
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Either/Or for unit spawns possible?

Post by thewood1 »

It is very doable. I would use an event, trigger, and action with a little lua. The lua would be needed to generate the random and make sure the aircraft are in one of the airfields. Then activate and deactivate the right missions. It might be easier to place duplicates of the aircraft in each field and then just activate or deactivate the missions. But its all possible.

You could do it all through lua, without the events. But that starts to get deep into lua coding. The event approach is a little more manageable for non-lua experts.
MarkJoergensen
Posts: 36
Joined: Tue Sep 21, 2021 12:58 pm

Re: Either/Or for unit spawns possible?

Post by MarkJoergensen »

Sweet, thanks!
Post Reply

Return to “Command: Modern Operations series”