Building scenario from Lua (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


michaelm75au -> Building scenario from Lua (2/25/2018 5:20:42 AM)

I am building a scenario from scratch, just using the SE commands (version 1.14)
Basically load the scenario, go to special actions and execute the action.

You will need to switch to the USN to see the units. [Need to see if this can be done in future by a SE command]

25.02.2018
Create a couple of sides
Add some units to one side
Add some missions and assign aircraft to them

Next steps
Add side units to the opposing side
Create some events




thewood1 -> RE: Building scenario from Lua (2/26/2018 1:58:22 PM)

Is this the beginning of a quick scenario builder of some sort?




michaelm75au -> RE: Building scenario from Lua (2/27/2018 8:55:28 AM)

No just an example of building a scenario using a number of Lua functions. Should be helpful to see how the commands are put together.
Could be used to say create a new side when certain things happen. Currently it is not easy to hide units are 'inactive'




aerosky -> RE: Building scenario from Lua (8/18/2021 3:02:35 AM)

I have downloaded your "Building scenario.scen", and read the lua script. But I can't find where to trigger the script.

quote:

ORIGINAL: michaelm75au

No just an example of building a scenario using a number of Lua functions. Should be helpful to see how the commands are put together.
Could be used to say create a new side when certain things happen. Currently it is not easy to hide units are 'inactive'





nukkxx5058 -> RE: Building scenario from Lua (10/30/2021 4:25:29 PM)


quote:

But I can't find where to trigger the script.


Same. I don't understand how the script is incorporated in the scen and how to trigger it other than manually by copy-paste into the Lua console.
The only Lua code I can see is in "special action" when I choose to edit it. Is it it ?




thewood1 -> RE: Building scenario from Lua (10/30/2021 5:38:33 PM)

I think if you don't understand where to "find" lua, you really need to start with the basics and not just examples. I suggest you look at a few of these videos.

https://www.youtube.com/results?search_query=cmo+lua+gatcomb

He does a great job in manageable concepts of showing what lua is and does.

I would start with this one that explains the event editor and that's important to how most people use lua in a scenario design.

https://www.youtube.com/watch?v=TCApvEgog4U

Then this one does a good job of expanding on it and getting into how lua works in the event editor. Its pretty simple. He has a number of others that go into more detail.

https://www.youtube.com/watch?v=0_XMMSsxl4Q&list=PLumwWCWlwh39mBwwGJh-LE4_KWwLobkoT&index=75




nukkxx5058 -> RE: Building scenario from Lua (10/30/2021 6:40:47 PM)

These videos are about syntax which I'm not interested in. What I want is to see where the code is located when I open a scenario with existing Lua script. For example if I want to edit the Lua script of an existing scenario.




musurca -> RE: Building scenario from Lua (10/30/2021 10:25:58 PM)

"Where" exactly the Lua is in a scenario can be a bit of a complicated question. Lua code can be either:

1) Executed as an LuaScript Action from an Event. (See Editor -> Event Editor -> Events or Actions).
2) Executed from an external file in the CMO/Lua directory.
3) Executed from a Lua script added to the scenario as an attachment.
4) Executed directly from Editor -> Lua Script Console.

Most of the time, the answer is #1, so you'll be able to find the code by browsing through the Events.




nukkxx5058 -> RE: Building scenario from Lua (11/1/2021 11:47:37 AM)


quote:

ORIGINAL: musurca

"Where" exactly the Lua is in a scenario can be a bit of a complicated question. Lua code can be either:

1) Executed as an LuaScript Action from an Event. (See Editor -> Event Editor -> Events or Actions).
2) Executed from an external file in the CMO/Lua directory.
3) Executed from a Lua script added to the scenario as an attachment.
4) Executed directly from Editor -> Lua Script Console.

Most of the time, the answer is #1, so you'll be able to find the code by browsing through the Events.


OK, got my answer, thanks ! I obviously knew about 4) but was wondering about the other ways. Perfect !







Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.59375