Jump to content

Recommended Posts

Posted

Yes.

 

There are a few different "lua" environments that can exist within DCS, so it is best to think of each as a local set of values only accessible to oneself. Some have functionality to do scripting in other environments, others don't. Within gameGui you can run scripts withing the config, mission, and export lua environments in addition to the server environment that gameGUI exists in. So with the gameGUI you can use a function called 'net.dostring_in' to run a script in config, mission, or export.

 

Gamegui is mostly used in multiplayer because it has a lot of functions meant for use in server admin scripting, but it also works in single player.

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks Grimes. I hadn't realised there was a difference. D'oh!

 

 

I had code which worked to a point (and then silently errored with nothing in the log) in GameGUI which when I moved it to the mission and fired it off via a trigger started erroring on things which worked previously like

StatSystem.logFile:write(os.date("!%c").."  -  "..str.."\n")

So I'm guessing that eventhandlers are not within the mission environment exposed via GameGUI then? and the net.log() isn't exposed within the ME trigger environment then?

 

 

Is there a rundown on what does and doesn't work where?

Posted
Is there a rundown on what does and doesn't work where?

 

DCSInstallFolder/API has a "DCSControl_API.txt" and that has all of the functions present within gameGUI.

 

DCSInstallFolder/Scripts has an export.lua file which contains documentation of functions accessible to that area.

 

On the hoggit wiki I've tried to keep it up to date as far as scripting engine goes.

 

 

As I said in the my first reply, some of the environments have functionality that allows for it to run code in other environments. Specifically you could use net.dostring_in('mission', <somecode>) to run the string in the mission scripting environment.

 

The scripting engine has its own event system. You can see it here: http://wiki.hoggit.us/view/Category:Events

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

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

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