Page 1 of 1

LUA To Automatically Load Overlays

Posted: Wed Nov 01, 2017 9:49 am
by butch4343
Folks,

Just a quick question, is it possible to have overlays automatically load when a scenario starts?

If so is that what the LUA script Get Attachment does?

How would you code that, and where would you store the overlay?

As always Im grateful for any advice.

Regards

Butch

RE: LUA To Automatically Load Overlays

Posted: Thu Nov 02, 2017 4:33 am
by michaelm75au
I think this should show you want you want to do.

RE: LUA To Automatically Load Overlays

Posted: Thu Nov 02, 2017 12:51 pm
by TitaniumTrout
I just did a tutorial on this, in my example it was a campaign scenario but everything is the same.

http://thestrategygamer.com/2017/10/29/command-modern-air-naval-operations-custom-overlays-campaign-overlays/

RE: LUA To Automatically Load Overlays

Posted: Thu Nov 02, 2017 6:40 pm
by butch4343
Guys

Thanks , thank you so much for this.

I know im going to sound really really thick here, but ...

... If I put post this scenario, do I need to include that repo file and then instruct the recipient to copy that repo folder into their command? Or will command handle all of that for me?

Regards

RE: LUA To Automatically Load Overlays

Posted: Fri Nov 03, 2017 4:32 am
by michaelm75au
When package up the scenario for distribution, it should include the attachments.
When the scenario is installed, the attachments are installed in the same folder as the SCEN file, but when the scenario is first loaded, it will move them to the 'repo' folder.

RE: LUA To Automatically Load Overlays

Posted: Fri Nov 03, 2017 6:31 am
by butch4343
Michael,

Thanks for your explanation, I am both grateful and in your debt. [:)]

Regards

Butch