Using the LUA console

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
Ed49601
Posts: 8
Joined: Sun Mar 08, 2020 4:32 pm

Using the LUA console

Post by Ed49601 »

Is there a tutorial or help pages on how to use the LUA for creating scenarios? I am a newby at this and have so many ideas for scenarios that I would like to create.
User avatar
KLAB
Posts: 507
Joined: Tue Feb 27, 2007 5:24 pm

RE: Using the LUA console

Post by KLAB »

https://www.matrixgames.com/forums/tt.asp?forumid=1681
Follow this link.
Extensive LUA guidance tutorials etc.
Enjoy.
K
exsonic01
Posts: 1133
Joined: Tue Jul 26, 2016 6:45 pm
Location: Somewhere deep in appalachian valley in PA

RE: Using the LUA console

Post by exsonic01 »

I was also about to ask this, thanks for links.
Ed49601
Posts: 8
Joined: Sun Mar 08, 2020 4:32 pm

RE: Using the LUA console

Post by Ed49601 »

Ok, I see those sites. I can't seem to find commands specifically for CMO.
thewood1
Posts: 10296
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Using the LUA console

Post by thewood1 »

Lua is a scripting language. Its not a CMO language. CMO uses it and a set of Lua functions the devs built to execute Lua with some specific CMO capabilities. You should watch a couple of the Lua tutorials to familiarize yourself with things like function calling, variable creation, etc.

But you can also execute simple Lua functions through the Lua console. For that, I would use the CMO/CMNAO documentation and examples.

This is a good place to start.

https://www.matrixgames.com/forums/tm.asp?m=4435326
User avatar
TitaniumTrout
Posts: 469
Joined: Mon Oct 20, 2014 9:06 am
Location: Michigan

RE: Using the LUA console

Post by TitaniumTrout »

Check the wiki too : https://weaponsrelease.com/index.php/CMO_Main_Page#Editor

You can also open a scenario in the editor and see how the creator did it. Whenever I run into something neat or clever I always like to see how it was done.
User avatar
SeaQueen
Posts: 1436
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: Using the LUA console

Post by SeaQueen »

There's the Command LUA functions and then there's the LUA language itself. Most people start off just doing simple things using Command's LUA functions, and become more and more sophisticated as the need arises.
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Using the LUA console

Post by michaelm75au »

Use the SE commands (with the Command Lua WIKI for the description of it) from the drop-down list to get a feel for the various functions with just base Lua commands (like print, if..then..else, etc).
Michael
bearhunter007
Posts: 23
Joined: Sat Mar 11, 2017 2:51 am

RE: Using the LUA console

Post by bearhunter007 »

Ed49601

The "Lua Legion" is a great resource for developing your command lua skills. Apache85 has lots of code segments that you can copy and use and/or modify for your purposes.

Good luck!

Post Reply

Return to “Command: Modern Operations series”