Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Building scenario from Lua

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Building scenario from Lua Page: [1]
Login
Message << Older Topic   Newer Topic >>
Building scenario from Lua - 2/25/2018 5:20:42 AM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
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

Attachment (1)

_____________________________

Michael
Post #: 1
RE: Building scenario from Lua - 2/26/2018 1:58:22 PM   
thewood1

 

Posts: 6461
Joined: 11/27/2005
Status: online
Is this the beginning of a quick scenario builder of some sort?

(in reply to michaelm75au)
Post #: 2
RE: Building scenario from Lua - 2/27/2018 8:55:28 AM   
michaelm75au


Posts: 13472
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
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'

_____________________________

Michael

(in reply to thewood1)
Post #: 3
RE: Building scenario from Lua - 8/18/2021 3:02:35 AM   
aerosky


Posts: 34
Joined: 7/20/2021
From: USA
Status: offline
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'



_____________________________

In the future, no space, no win

(in reply to michaelm75au)
Post #: 4
RE: Building scenario from Lua - 10/30/2021 4:25:29 PM   
nukkxx5058


Posts: 2902
Joined: 2/3/2005
From: France
Status: offline

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 ?

(in reply to aerosky)
Post #: 5
RE: Building scenario from Lua - 10/30/2021 5:38:33 PM   
thewood1

 

Posts: 6461
Joined: 11/27/2005
Status: online
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

_____________________________

You are like puss filled boil on nice of ass of bikini model. You are nasty to everybody but then try to sweeten things up with a nice post somewhere else. That's nice but you're still a boil on a beautiful thing! - BDukes

(in reply to nukkxx5058)
Post #: 6
RE: Building scenario from Lua - 10/30/2021 6:40:47 PM   
nukkxx5058


Posts: 2902
Joined: 2/3/2005
From: France
Status: offline
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.

< Message edited by nukkxx5058 -- 10/30/2021 6:41:13 PM >

(in reply to thewood1)
Post #: 7
RE: Building scenario from Lua - 10/30/2021 10:25:58 PM   
musurca

 

Posts: 113
Joined: 7/16/2020
Status: offline
"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.

< Message edited by musurca -- 10/30/2021 10:27:46 PM >

(in reply to nukkxx5058)
Post #: 8
RE: Building scenario from Lua - 11/1/2021 11:47:37 AM   
nukkxx5058


Posts: 2902
Joined: 2/3/2005
From: France
Status: offline

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 !




(in reply to musurca)
Post #: 9
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Building scenario from Lua Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.277