Jump to content

Recommended Posts

Posted (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 by piXel496
I don't ask to make a portal in spacetime. I just want to make a proper working MP mission..
Posted (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 by piXel496
Posted

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.

Posted
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

ChromiumDis.png

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.

Posted

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

Posted (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 by ajax
Posted
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 ... )...

ChromiumDis.png

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.

Posted

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.

Posted (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 by ajax
Posted

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...)

ChromiumDis.png

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.

  • Recently Browsing   0 members

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