|
Post by [BMG]Neutro on Aug 26, 2018 13:53:11 GMT 1
Hello ive got a Problem with my Multiplayer Map.
4 Player Map USA vs Germany
It seems if Player 3 request Airsupport (of any type) he got directly a Desync and get kicked out.
I checked the Planes, Scripts in the .lua, Aircraft Entrance Point, i cant find the issue. The Map worked without anny issues in the past but in the latest version this strange crash occurs. I did not changed anything Air related... only landscape stuff
I will Upload the Map and lua here. Maybe someone have an idea?
Thanks guys
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
Post by kaoz on Sept 5, 2018 19:36:33 GMT 1
Hi Neutro!
A quick look made me stumble over the following function:
function paradrop() EnableAviation(2, 2); EnableAviation(3, 2); Cmd(22, 808, 2, 5622, 7350); Cmd(22, 809, 3, 12220, 9491); DisableAviation(2, 2); DisableAviation(3, 2); Suicide(); end;
Enabling and disabling the same aviation simultaneously is not a good idea... although I would suspect the same problem happening to player 2 as well, not only #3.
The BK lua script does act strange sometimes when programming aviation. If I remember correct, I've had troubles with disabling all (-1) and then next, the player 1 (enemy) did not want to enable them separately. Hope I'm not mistaken here what I'm saying because it's long ago. There should be a topic about it somewhere here, but...
You should also give it more time, between the plane actions that is. Create separate functions. One for enabling, one for Cmd (you could combine this, but when you throw in a lot of units, the Cmd might get delayed and cause malfunctions) and one for disabling again. Write it so that these functions have timers. Something like:
function RevealObjective1() RunScript("enable", 3000); RunScript("disable", 69000); Suicide(); end; function enable() EnableAviation(1, 3); Cmd(19, 999, 1, 8698, 14843); Suicide(); end; function disable() DisableAviation(1, 3); Suicide(); end;
In this example the disable runs after 69 seconds. You should somewhat time it and set the disable a few moments before the planes have returned home.
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
Post by kaoz on Sept 5, 2018 19:48:47 GMT 1
Found the topicSo yes, I use enable/disable all (-1) or enable/disable them individually. I do not mix them together, because I had problems to get planes disabled again.
|
|
|
Post by [BMG]Neutro on Sept 6, 2018 10:16:14 GMT 1
Many Thanks for the answer yes i have two Problems indeed.. 1. The Crash caused by Desync 2. as soon as the USA planes are back at the border of the map and disappeared the USA Player can directly request a new "wave" but it should be disabled for ever! KAOZ "In one scenario I have a scripted paradrop for the player 0, where I want no more paradrops possible after that one. Using Disable(0, 2); did not work, no matter what I tried, even trying the Relax Time and timing the returning home for setting the Disable script."
The Test Map received a Update in the lua file with your and Quintaxel proposals but it still wont work
To test go Multiplayer > Network > Start Lobby > select map > choose USA Player > Start
You will see the Problem as soon as the Airplanes "returned to base"
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
Post by kaoz on Sept 6, 2018 22:20:32 GMT 1
2. as soon as the USA planes are back at the border of the map and disappeared the USA Player can directly request a new "wave" but it should be disabled for ever! Yep, exactly the same problem... I see in the lua that you have tried enabling them separately and still doesn't work. I'll give it a closer look, but it will have to wait until the weekend. Maybe tomorrow night, if time permits me.
|
|
kaoz
General
inter faesces et urinam nascimur
Posts: 1,112
|
Post by kaoz on Sept 12, 2018 23:35:38 GMT 1
Neutro, I had a look at the map:
First, I have moved all RunScripts from the Init to function Dead() = just to be shure it has zero influence. Second, when I change in function CheckStatPlane808() and function CheckStatPlane809() to DisableAviation(2, -1); and DisableAviation(3, -1); - it then works. Third, turning back on separately doesn't work. I haven't tried EnableAviation(3, -1); yet. I think that will work, will try later, but if so you could then still limit the plane options in the MapEditor.
Seems like a fun map btw.
|
|
|
Post by [BMG]Neutro on Sept 18, 2018 22:30:09 GMT 1
Well it looks like this not so nice script is the only working option function paradrop() EnableAviation(2, 2); EnableAviation(3, 2); Cmd(22, 808, 2, 5622, 7350); Cmd(22, 809, 3, 12220, 9491); RunScript("disablepara",1000); Suicide(); end; function disablepara() DisableAviation(2, 2); DisableAviation(3, 2); end;
limit plane options is not a option XD because only para should be disabled
|
|
|
Post by keepitsimple on Sept 19, 2018 10:34:34 GMT 1
In the past I found that one of troubles with enable/dis-enable aviation in BK is that the command disable does't work if give the command is given while the plane(s) are in game. [BMG]Neutro with running the function disablepara ever second (1000) you make sure that ones the transport plane disappear from the game the player has just one second to send in para planes (this he will not see) and hence it works. Now this script will keep running ever second till end of game. You could however kill this script after a couple of minutes. In game you can test how long it takes till the transporter exit. You could then add RunScript("disableparaSTOP", x minute*60000); function disableparaStop() KillScript("disablepara"); Suicide(); end;
|
|
|
Post by [BMG]Neutro on Sept 19, 2018 19:21:29 GMT 1
I think that is the missing Detail in the Problem many thanks!
it works right now this way:
function paradrop() EnableAviation(2, 2); EnableAviation(3, 2); Cmd(22, 808, 2, 5622, 7350); Cmd(22, 809, 3, 12220, 9491); RunScript("disablepara",1000); Suicide(); end;
function disablepara()
DisableAviation(2, 2); DisableAviation(3, 2); end;
function disableparaStop()
KillScript("disablepara"); Suicide(); end;
function Init()
RunScript("paradrop",52000); RunScript("disableparaStop",180000); end;
the KillScript take action 20 seconds after the planes disappear from the Map--- until this point the function disablepara is activ
|
|