piXel496 Posted June 8, 2014 Posted June 8, 2014 (edited) In MP as host I tried: function letsTestNet() local _isServer = net.is_server() local _txt = "empty" if _isServer == nil then _txt = "nothing found" elseif _isServer then _txt = "server" else _txt = "something else probably false" end trigger.action.outTextForCoalition(coalition.side.BLUE, string.format("###DEBUG### " .. _txt), 10) end Nothing happend.. Anyone knows how to get a response from for example: net.is_server() ? Thanks . Edited June 8, 2014 by piXel496 I don't ask to make a portal in spacetime. I just want to make a proper working MP mission.. old stuff I made
ajax Posted June 9, 2014 Posted June 9, 2014 I don't know if this will work, but try: _G['net'].is_server()
piXel496 Posted June 9, 2014 Author Posted June 9, 2014 (edited) Thanks Ajax. Unfortunately it did not work i also tried: _G.net.is_server(). But all help is still welcome! :helpsmilie: :helpsmilie: :helpsmilie: . Edited June 10, 2014 by piXel496 old stuff I made
ajax Posted June 11, 2014 Posted June 11, 2014 Just fyi, I did a table dump of _G, and 'net' is not available in the mission-scripting environment. I'm sure you can get access by hooking into main.lua in {DCS}\scripts\net. You can look at Servman or Slmod to see how it's done.
chromium Posted June 11, 2014 Posted June 11, 2014 Just fyi, I did a table dump of _G, and 'net' is not available in the mission-scripting environment. I'm sure you can get access by hooking into main.lua in {DCS}\scripts\net. You can look at Servman or Slmod to see how it's done. Could you please attach the outcome of the table dump? I'm really interested to understand if minizip functions are available in the mission-scripting environment... thanks in advance, Lorenzo Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
ajax Posted June 11, 2014 Posted June 11, 2014 Table dump attached. Unfortunately, Chromium, 'minizip' is not in the mission-scripting environment. As far as I can tell, it is only available in the mission-editor environment._G.zip
xcom Posted June 12, 2014 Posted June 12, 2014 I think your _G output shows tables of the airfield resources, something we have no control over with the current scripting engine. Do you think we can alter those tables on an on going mission to change fuel levels, ammunition, airplane counts? [sIGPIC][/sIGPIC] BuddySpike Website | Live Map & Statistics BuddySpike Twitch Channel Buddyspike Discord Buddyspike Facebook
ajax Posted June 12, 2014 Posted June 12, 2014 (edited) I have no idea. You should be able to change values. Try it and let us know.:) Edit: I guess it depends on how the game uses the table data. If it reads it in only once at mission start then it wouldn't do any good to change the values. If, however, the game reads the table on a periodic basis, then I see no reason you couldn't alter the resources dynamically. Edited June 12, 2014 by ajax
chromium Posted June 12, 2014 Posted June 12, 2014 Table dump attached. Unfortunately, Chromium, 'minizip' is not in the mission-scripting environment. As far as I can tell, it is only available in the mission-editor environment. Sad, I really have to find a way to read the "mission" file inside the zip... maybe I could work a different way, since in SLmod utils.lua there is a function made to open mission file. I'll look into your dump asap. Thanks a lot, I'm sorry that I can't give you another rep (must spread ... )... Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
McMicha Posted June 12, 2014 Posted June 12, 2014 Hello ajax, you explain to me, how you created the _G table? Simpit Software by SDA "SIMPIT DEVELOPER ASSOCIATION" DCS ExportScript D.A.C. DCS to Arcaze Communicator Ikarus a new Virtual Cockpit Software Deutscher Forums Thread English Forums Thread Hard/Software: AMD Ryzen 7 1800X, 32 GiB RAM, extra SSD for Windows 10 and DCS World, AMD Vega Frontier Edition with 16 GiB VRAM
ajax Posted June 12, 2014 Posted June 12, 2014 I used Mist. In it are debugging functions, one of which will dump a table to your log folder. I temporarily hardcoded the _G table name in the code then called the function.
McMicha Posted June 12, 2014 Posted June 12, 2014 Thanks for the info... Simpit Software by SDA "SIMPIT DEVELOPER ASSOCIATION" DCS ExportScript D.A.C. DCS to Arcaze Communicator Ikarus a new Virtual Cockpit Software Deutscher Forums Thread English Forums Thread Hard/Software: AMD Ryzen 7 1800X, 32 GiB RAM, extra SSD for Windows 10 and DCS World, AMD Vega Frontier Edition with 16 GiB VRAM
ajax Posted June 13, 2014 Posted June 13, 2014 (edited) ...since in SLmod utils.lua there is a function made to open mission file. I looked at that Slmod function, and it is specifically only for unzipped mission files. I suppose you can do the same -- read it in from the DCS temp folder. Edited June 13, 2014 by ajax
chromium Posted June 13, 2014 Posted June 13, 2014 Yes you're right, I misunderstood the way it work that function. Anyway the bad part is that I'm still unable to repack what I can read from the tempo folder to a new zip file :). I'll give a further try this evening (at the moment I'm stuck on another problem regarding died units...) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
Recommended Posts