Jump to content

M.E. SCRIPT FILE CHEAT SHEET?


[Knight]
 Share

Recommended Posts

I think there is enough info about scripts available to make a cheat sheet. I'm a total nubbins when it comes to these things so I would like to help myself and others that are in my shoes. I know that there are allot of different scripts. I'm just asking for the most common and most used scripts available varying from below to spawning units.

IMPORTANT: Please specify what script file the script came from and a link to the forum post

 

Here is an easy format to use..

 

Script file: CTTS.lua http://forums.eagle.ru/showthread.php?t=108523

 

To pre-load units with troops during mission call at least 10s after mission started via DoScript action the following standalone function:

LoadTransport("unitName", number)

Where:

- "unitname" = the name of the transport

- number = optionally the number of troops.

 

Examples:

a. LoadTransport("helicargo1") This will load with default number of troops the unit "helicargo1"

b. LoadTransport("helicargo1",4) This will load it with 4 troops

 

 

As you see it the example has the script as it should be entered and a description on what it does.

 

I have so many questions but I literately have to dig around for hours on the forum to find answers at least this would help.

 

I know I'm asking for allot and yes this would be a huge task at hand. I would greatly appreciate it. Once I think there are enough script available I will put it all together and make it look nice and neat and easy to read.


Edited by [Knight]
Link to comment
Share on other sites

Each script is unique and generally do different things and its probably best for the creator of the script to also create at least some documentation to go along with it. The format I've been using for Mist and probably future stuff is simply like this:

table mist.heli.buildWP (table point, string type, number speed, number altitude, string altitudeType)

 

table = format is returned from the function

mist.heli.buildWP = Function Name

Everything in blue is required, green is optional.

Each variable is displayed as: variable type, variable description.

 

Its kind of a PITA to type out, but its easy to read and figure out what is what.

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Each script is unique and generally do different things and its probably best for the creator of the script to also create at least some documentation to go along with it. The format I've been using for Mist and probably future stuff is simply like this:

table mist.heli.buildWP (table point, string type, number speed, number altitude, string altitudeType)

 

table = format is returned from the function

mist.heli.buildWP = Function Name

Everything in blue is required, green is optional.

Each variable is displayed as: variable type, variable description.

 

Its kind of a PITA to type out, but its easy to read and figure out what is what.

 

OK you lost me I did mention that I'm new to scripts right :D

But i get that there would be way to many scripts so this thread is pretty much dead in the water? Do you know where I can find a good guide for beginners :doh: I have been trying to decipher missions in the ME to see how it is put together with scripts but seeing how I have no Idea what I'm doing I can't do it.

 

Any way I made this thread so maybe all the script gurus could put all the scripts in one place and a how to guide If you could spread the word I think it would be handy.

Link to comment
Share on other sites

Murphy87...what you use as an example format above "LoadTransport("unitName", number)" is referring to a function code in his .lua file specific to that mission, that is much longer and not as simple/user-friendly. That short script you show needs geloxo's specific .lua file loaded to work - it does nothing on it's own. So in essence, that one-liner is not "the script" to achieve the desired in-mission action.

 

This is why it would be very difficult to combine all of the useful scripts people have been creating into one "cheat sheet". The functions described like geloxo's are only specific to the individual script file each author has made, and the functions can sometimes be quite complicated to create or follow without some .lua/programming experience.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...