LUA To Automatically Load Overlays

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

LUA To Automatically Load Overlays

Post 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
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LUA To Automatically Load Overlays

Post by michaelm75au »

I think this should show you want you want to do.
Attachments
WECDavos..rrorists.zip
(2.12 MiB) Downloaded 19 times
Michael
User avatar
TitaniumTrout
Posts: 469
Joined: Mon Oct 20, 2014 9:06 am
Location: Michigan

RE: LUA To Automatically Load Overlays

Post 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/
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: LUA To Automatically Load Overlays

Post 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
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LUA To Automatically Load Overlays

Post 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.
Michael
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: LUA To Automatically Load Overlays

Post by butch4343 »

Michael,

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

Regards

Butch
Post Reply

Return to “Lua Legion”