Lua console.... editor only?

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
parmenio
Posts: 268
Joined: Thu Aug 06, 2009 8:02 am
Location: United Kingdom

Lua console.... editor only?

Post by parmenio »

A quick question from the uninitiated... but I'm guessing the Lua console will only display when editing a scenario and not while playing one?

Someone posted a script for creating a circular prosecution area using a smaller no of points (well it actually creates a circle of reference points around a unit) but the thread was about creating a circle of reference points.

https://www.matrixgames.com/forums/tm.asp?m=4845373

I'm not sure how that functionality would/could be made available to the player?
Wargame Design Studio
Lead Programmer
https://wargameds.com/
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Lua console.... editor only?

Post by kevinkins »

The lua console is just available when using CMO is editor mode. But many people play in that mode. You don't lose fog of war unless you take a peek at the enemy side and their missions. So there is a work around if the player wants to do some coding while playing from one side. I get a sense that many who use CMO Pro do coding while "playing".
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: Lua console.... editor only?

Post by stilesw »

but I'm guessing the Lua console will only display when editing a scenario and not while playing one?
Andy,

You are correct. The Lua example would be used in editor mode using the Lua console. If you are playing strictly in "player" mode there is no way to implement it.

Typically, a scenario designer would use it when creating a new scenario however, you can always switch to (or play in editor mode) to create the zone.

-WS
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

RE: Lua console.... editor only?

Post by jkgarner »

If you are playing strictly in "player" mode there is no way to implement it.

That is not entirely accurate.

One could write the code in edit mode, test it, and then create a special action to trigger the code, copying the code from the console to the special action editor. After doing this, you must save the scenario to a new name.

Having accomplished all this, you could launch the newly saved scenario in regular mode and call the special action to run the code.

That is a lot of work.
User avatar
parmenio
Posts: 268
Joined: Thu Aug 06, 2009 8:02 am
Location: United Kingdom

RE: Lua console.... editor only?

Post by parmenio »

Thanks guys.... I hadn't thought of playing in editor mode.

Maybe a trick is being missed here.... how hard would it be to have the console available in player mode and what would be the problem with that?

Edit: actually - maybe it doesn't matter at all since I can also edit in-progress saves. When I'm a bit more familiar with the game, I may well have a play.
Wargame Design Studio
Lead Programmer
https://wargameds.com/
Post Reply

Return to “Lua Legion”