Jump to content

Recommended Posts

Hello guys, i have been trying to set up an animated briefing for one of my multiplayer games. this animated briefing was introduced with the arma 3 spec ops dlc (https://community.bistudio.com/wiki/Arma_3_Animated_Briefing#Map_and_Marker_Functions). In single player it goes perfectly. However, in a dedicated server it works very desyncronized. I already tried to execute the document in the InitPlayerLocal. In there there is a line that execute the sqf where all the intro is stored. I even created one by one locally the markers. How ever, it still gives desync, even when it should all be executed in each client. Here is the script:

 

Spoiler

 

/////// marcadores intro

createMarkerLocal ["nato3", [1572.92,430.364]];
createMarkerLocal ["nato2", [1697.55,300.582]];
createMarkerLocal ["nato1", [1796.75,147.897]];
"nato3" setMarkerTypeLocal "flag_NATO";
"nato2" setMarkerTypeLocal "flag_NATO";
"nato1" setMarkerTypeLocal "flag_NATO";

createMarkerLocal ["Alpha", [5363.13,3750.39]];
createMarkerLocal ["Bravo", [5382.05,3756.21]];
createMarkerLocal ["Charlie", [5391.16,3764.46]];
"alpha" setMarkerTypeLocal "b_inf";
"bravo" setMarkerTypeLocal "b_inf";
"charlie" setMarkerTypeLocal "b_inf";

createMarkerLocal ["Suministros1", [2831.75,6104.01]];
createMarkerLocal ["Suministros2", [2785.64,6099.79]];
"Suministros1" setMarkerTypeLocal "mil_objective";
"Suministros2" setMarkerTypeLocal "mil_objective";
"Suministros1" setMarkerColorLocal "ColorRed";
"Suministros2" setMarkerColorLocal "ColorRed";

createMarkerLocal ["radio1", [3507.52,4914.31]];
createMarkerLocal ["radio2", [5207.19,5000.76]];
createMarkerLocal ["radio3", [5013.24,5906.55]];
"radio1" setMarkerTypeLocal "loc_Transmitter";
"radio2" setMarkerTypeLocal "loc_Transmitter";
"radio3" setMarkerTypeLocal "loc_Transmitter";
"radio1" setMarkerColorLocal "ColorRed";
"radio2" setMarkerColorLocal "ColorRed";
"radio3" setMarkerColorLocal "ColorRed";
"radio1" setMarkerSizeLocal [1.5, 1.5];
"radio2" setMarkerSizeLocal [1.5, 1.5];
"radio3" setMarkerSizeLocal [1.5, 1.5];

createMarkerLocal ["Tak2", [4620.87,5295.79]];
createMarkerLocal ["Tak3", [4381.37,6527.4]];
createMarkerLocal ["Tak4", [2961.61,5969.35]];
createMarkerLocal ["Tak5", [2024.12,5497.22]];
createMarkerLocal ["Tak6", [2007.88,3561.26]]; 
createMarkerLocal ["Tak7", [3376.22,2956.47]];
createMarkerLocal ["Tak8", [2073.21,5717]];
createMarkerLocal ["Tak9", [2945.47,1872.99]];
createMarkerLocal ["Tak10", [2965.58,6021.54]];
"Tak2" setMarkerTypeLocal "lop_flag_tak";
"Tak3" setMarkerTypeLocal "lop_flag_tak";
"Tak4" setMarkerTypeLocal "lop_flag_tak";
"Tak5" setMarkerTypeLocal "lop_flag_tak";
"Tak6" setMarkerTypeLocal "lop_flag_tak";
"Tak7" setMarkerTypeLocal "lop_flag_tak";
"Tak8" setMarkerTypeLocal "lop_flag_tak";
"Tak9" setMarkerTypeLocal "lop_flag_tak";
"Tak10" setMarkerTypeLocal "lop_flag_tak";

["infpueblo1",0] spawn BIS_fnc_hideMarker;
["infpueblo2",0] spawn BIS_fnc_hideMarker;
["infpueblo3",0] spawn BIS_fnc_hideMarker;
["suministros1",0] spawn BIS_fnc_hideMarker;
["suministros2",0] spawn BIS_fnc_hideMarker;
["radio1",0] spawn BIS_fnc_hideMarker;
["radio2",0] spawn BIS_fnc_hideMarker;
["radio3",0] spawn BIS_fnc_hideMarker;


Sleep 2.5;


0 enableChannel false;
1 enableChannel false;
2 enableChannel false;
3 enableChannel false;
4 enableChannel false;
5 enableChannel false;

showCompass false;

showGPS false;

forceMap true;

playMusic "LeadTrack02_F_Jets";
 
mapAnimAdd [0.5, 0.1, markerPos "centromapa"];  
mapAnimCommit;  
 
sleep 5; 
 
mapAnimAdd [20, 0.6, markerPos "centromapa"];  
mapAnimCommit; 

["Tte. Uiden", "Stratis... han pasado 6 meses desde que los takistanies la ocuparon... debemos retomarla, y eso vamos a hacer."] spawn BIS_fnc_showSubtitle; 
sleep 5;

["Tte. Uiden", "Las Fuerzas de la OTAN han comenzando en esta manana un ataque anfibio en el sur de la isla."] spawn BIS_fnc_showSubtitle; 
sleep 5;

["Tte. Uiden", "Su objetivo: establecer una cabeza de playa en las 3 zonas de desembarco. Sin embargo, ahora mismo no pueden vencer."] spawn BIS_fnc_showSubtitle; 
Sleep 5;

["Tte. Uiden", "La guarnición de la isla es demasiado numerosa, y se han dirigido en masa a repeler el ataque."] spawn BIS_fnc_showSubtitle; 
Sleep 5; 

 
mapAnimAdd [10, 0.18, markerPos "playas"];  
mapAnimCommit; 

sleep 7;

["Tte. Uiden", "Según los últimos informes, nuestras fuerzas han desembarcado con poca o ninguna oposición."] spawn BIS_fnc_showSubtitle; 

sleep 5;


["nato1",(getMarkerPos "avance1"),4] call BIS_fnc_moveMarker;
sleep 1;
["nato2",(getMarkerPos "avance2"),4] call BIS_fnc_moveMarker;
sleep 1;
["nato3",(getMarkerPos "avance3"),4] call BIS_fnc_moveMarker;
Sleep 5;

["Tte. Uiden", "Consiguieron incluso rebasar y eliminar a una unidad de takistanies que tiraron las armas en los primeros 5 minutos de combate."] spawn BIS_fnc_showSubtitle;
["nato1",(getMarkerPos "avance1_2"),3] call BIS_fnc_moveMarker;
["nato2",(getMarkerPos "avance2_2"),3] call BIS_fnc_moveMarker;
["nato3",(getMarkerPos "avance3_2"),3] call BIS_fnc_moveMarker;
Sleep 3;
["tak9",1,1,1] spawn BIS_fnc_cancelMarker;
["tak9",1] spawn BIS_fnc_hideMarker;
Sleep 2;

["Tte. Uiden", "Al saber sobre este suceso, casi todas las fuerzas enemigas se dirigieron al Sur para contrarrestar la amenaza."] spawn BIS_fnc_showSubtitle;


["tak1",(getMarkerPos "tak_def1"),5] call BIS_fnc_moveMarker;
["tak2",(getMarkerPos "tak_def2"),5] call BIS_fnc_moveMarker;
["tak3",(getMarkerPos "tak_def3"),5] call BIS_fnc_moveMarker;
["tak4",(getMarkerPos "tak_def4"),5] call BIS_fnc_moveMarker;
["tak5",(getMarkerPos "tak_def5"),5] call BIS_fnc_moveMarker;
["tak6",(getMarkerPos "tak_def6"),5] call BIS_fnc_moveMarker;

mapAnimAdd [2, 0.6, markerPos "centromapa"];   
mapAnimCommit;

sleep 5;

mapAnimAdd [5, 0.15, markerPos "avance2_3"];   
mapAnimCommit;

["Tte. Uiden", "Y eso es lo que ha sucedido hasta ahora. Los nuestros se han quedado estancados frente a Camp Maxwell, donde se han encontrado una fuerte oposición y se suceden duros combates."] spawn BIS_fnc_showSubtitle; 
["nato1",(getMarkerPos "avance1_3"),3] call BIS_fnc_moveMarker;
["nato2",(getMarkerPos "avance2_3"),3] call BIS_fnc_moveMarker;
Sleep 10; 

["Tte. Uiden", "Aquí es donde entramos nosotros. Con esa cantidad de tropas, el enemigo necesitará muchos suministros para mantenerlos."] spawn BIS_fnc_showSubtitle; 

mapAnimAdd [5, 0.05, markerPos "inicio"];   
mapAnimCommit;  

sleep 6;

["Tte. Uiden", "Sin ellos, sus tropas no durarán mas de unas horas en condiciones de combate"] spawn BIS_fnc_showSubtitle; 
sleep 5;

["Tte. Uiden", "Además, si conseguimos eliminarlos, al estar detrás de sus lineas, lo mas probable es que se desmoralicen."] spawn BIS_fnc_showSubtitle; 
sleep 5;

["Tte. Uiden", "Nosotros comenzaremos la operación en la bahía de Limeri. Gracias a los informes de inteligencia, sabemos donde se encuentra el grueso de sus suministros."] spawn BIS_fnc_showSubtitle; 
sleep 8;

mapAnimAdd [5, 0.1, markerPos "puerto"];   
mapAnimCommit; 

["Tte. Uiden", "Están en el puerto del pueblo de Agia Marina. En este punto podremos encontrar sus reservas de combustible y munición."] spawn BIS_fnc_showSubtitle; 
sleep 6;


["suministros1",3] spawn BIS_fnc_showMarker;
["suministros2",3] spawn BIS_fnc_showMarker;

sleep 5;

["Tte. Uiden", "Por suerte, no debería suponer un problema mayor, ya que la mayoría de las tropas enemigas se encuentran en el sur combatiendo."] spawn BIS_fnc_showSubtitle; 
sleep 3;

mapAnimAdd [5, 0.05, markerPos "centropueblo"];   
mapAnimCommit; 

sleep 5;

["Tte. Uiden", "Según las transmisiones que hemos podido interceptar, debería haber unos 3 pelotones de infantería con apoyo de vehiculos ligeros en el pueblo."] spawn BIS_fnc_showSubtitle; 
sleep 3;

["infpueblo1",1] spawn BIS_fnc_showMarker;
["infpueblo2",1] spawn BIS_fnc_showMarker;
["infpueblo3",1] spawn BIS_fnc_showMarker;

sleep 5;

["Tte. Uiden", "Sin embargo, tenemos un problema que debe ser solventado antes de atacar la población."] spawn BIS_fnc_showSubtitle;
sleep 3;

playMusic "LeadTrack02_F_Jets";

sleep 2;

["Tte. Uiden", "Hay una serie de puestos que protegen el pueblo desde las alturas. Para atacar el pueblo, deberán ser eliminados."] spawn BIS_fnc_showSubtitle;

mapAnimAdd [10, 0.15, markerPos "centroantenas"];   
mapAnimCommit; 

sleep 6;

["Tte. Uiden", "Los puestos tienen además unas radios que podrían dar al traste con la operación si avisan a sus tropas del frente para proteger los suministros."] spawn BIS_fnc_showSubtitle;
sleep 6;

["Tte. Uiden", "Se encuentran aquí, aquí y aquí. Deberán ser eliminados en menos de 5 minutos desde el momento en que seamos detectados."] spawn BIS_fnc_showSubtitle;
sleep 1;

["radio1",1] spawn BIS_fnc_showMarker;
sleep 1;
["radio1", 3, 1] spawn BIS_fnc_blinkMarker;
sleep 1;
["radio2",1] spawn BIS_fnc_showMarker;
sleep 1;
["radio1", 3, 1] spawn BIS_fnc_blinkMarker;
sleep 1;
["radio3",1] spawn BIS_fnc_showMarker;
sleep 1;
["radio1", 3, 1] spawn BIS_fnc_blinkMarker;
sleep 3;

["Tte. Uiden", "El poco tiempo impedirá que puedan llamar a refuerzos debido a la confusión."] spawn BIS_fnc_showSubtitle;
sleep 6;
["Tte. Uiden", "Recuerden, es PRIORITARIO eliminarlos TODOS en menos de 5 minutos, de lo contrario, se nos echará todo el ejercito enemigo encima."] spawn BIS_fnc_showSubtitle;
sleep 5;
["Tte. Uiden", "El sargento Mishi les explicará con detalle como procederemos. Escuchenle con atención, es la puta élite."] spawn BIS_fnc_showSubtitle;
sleep 7;

["Sgt. Mishi", "Gracias Tte. Procederemos como siempre, rápido, sencillo, y para toda la familia."] spawn BIS_fnc_showSubtitle;
sleep 5;

["Sgt. Mishi", "Nos dividiremos en 3 unidades. Cada una avanzará como considere hasta su objetivo designado."] spawn BIS_fnc_showSubtitle;

mapAnimAdd [4, 0.3, markerPos "centroantenas"];   
mapAnimCommit; 

sleep 5;

["alpha",0] spawn BIS_fnc_showMarker;
["bravo",0] spawn BIS_fnc_showMarker;
["charlie",0] spawn BIS_fnc_showMarker;

["Sgt. Mishi", "Recuerden, el sigilo el clave. Una vez estemos todos en posición, atacaremos A LA VEZ. recuerden, el objetivo prioritario es destruir los vehiculos de comunicaciones."] spawn BIS_fnc_showSubtitle;


["alpha",(getMarkerPos "marker1pre"),10] call BIS_fnc_moveMarker;
sleep 1;
["bravo",(getMarkerPos "marker2pre"),10] call BIS_fnc_moveMarker;
sleep 1;
["charlie",(getMarkerPos "marker3prepre"),5] call BIS_fnc_moveMarker;
sleep 6;
["charlie",(getMarkerPos "marker3pre"),5] call BIS_fnc_moveMarker;
sleep 6;

["alpha",(getMarkerPos "marker1"),1] call BIS_fnc_moveMarker;
sleep 1.5;

["bravo",(getMarkerPos "marker2"),1] call BIS_fnc_moveMarker;
sleep 1.5;

["charlie",(getMarkerPos "marker3"),1] call BIS_fnc_moveMarker;

sleep 1.5;


["radio1",1,1,1] spawn BIS_fnc_cancelMarker;

["radio2",1,1,1] spawn BIS_fnc_cancelMarker;

["radio3",1,1,1] spawn BIS_fnc_cancelMarker;

sleep 1;

["radio1",1] spawn BIS_fnc_hideMarker;


["radio2",1] spawn BIS_fnc_hideMarker;


["radio3",1] spawn BIS_fnc_hideMarker;

["Sgt. Mishi", "Recuerden, el sigilo el clave. Una vez estemos todos en posición, atacaremos A LA VEZ. recuerden, el objetivo prioritario es destruir los vehiculos de comunicaciones."] spawn BIS_fnc_showSubtitle;
sleep 8;

["Sgt. Mishi", "A continuación, deberemos entrar en el pueblo y eliminar la resistencia enemiga."] spawn BIS_fnc_showSubtitle;


["alpha",(getMarkerPos "marker1pu"),5] call BIS_fnc_moveMarker;
sleep 1;
["bravo",(getMarkerPos "marker2pu"),5] call BIS_fnc_moveMarker;
sleep 1;
["charlie",(getMarkerPos "marker3pu"),5] call BIS_fnc_moveMarker;
sleep 4;

["alpha",(getMarkerPos "marker1pu_1"),2] call BIS_fnc_moveMarker;
sleep 1;
["bravo",(getMarkerPos "marker2pu_1"),2] call BIS_fnc_moveMarker;
sleep 1;
["charlie",(getMarkerPos "marker3pu_1"),2] call BIS_fnc_moveMarker;
sleep 3;

["infpueblo3",1,1,1] spawn BIS_fnc_cancelMarker;

["infpueblo2",1,1,1] spawn BIS_fnc_cancelMarker;

["infpueblo1",1,1,1] spawn BIS_fnc_cancelMarker;

sleep 2;

["infpueblo1",1] spawn BIS_fnc_hideMarker;


["infpueblo2",1] spawn BIS_fnc_hideMarker;


["infpueblo3",1] spawn BIS_fnc_hideMarker;


["Sgt. Mishi", "Por último, eliminaremos con explosivos los suministros enemigos para a continuación aguantar la posición en el pueblo hasta que llegue la caballería. ¿Preguntas?"] spawn BIS_fnc_showSubtitle;

sleep 3;

["suministros1",1,1,1] spawn BIS_fnc_cancelMarker;

["suministros2",1,1,1] spawn BIS_fnc_cancelMarker;

sleep 2;

["suministros1",1] spawn BIS_fnc_hideMarker;

["suministros2",1] spawn BIS_fnc_hideMarker;

mapAnimAdd [4, 0.3, markerPos "centropueblo"];   
mapAnimCommit; 


sleep 5;

[0, "BLACK", 3, 0] spawn BIS_fnc_fadeEffect;

sleep 5;

[] spawn {    
    ["<br/><br/><br/><br/><br/><t size='1.5' color='#FF8C00'>Blue Liberty<br/></t><t size='.7' color='#FFFFFF'>Por Michipower</t>",0,0,3,12] spawn BIS_fnc_dynamicText;
    };

forceMap false;
sleep 1;

["alpha",0] spawn BIS_fnc_hideMarker;
["bravo",0] spawn BIS_fnc_hideMarker;
["charlie",0] spawn BIS_fnc_hideMarker;

0 enableChannel true;
1 enableChannel true;
2 enableChannel true;
3 enableChannel true;
4 enableChannel true;
5 enableChannel true;

showCompass true;

showGPS true;

Sleep 5;

[1, "BLACK", 3, 0] spawn BIS_fnc_fadeEffect;
5 fadeMusic 0;

["radio1",0] spawn BIS_fnc_hideMarker;
["radio2",0] spawn BIS_fnc_hideMarker;
["radio3",0] spawn BIS_fnc_hideMarker;


 


I have tried several things and I still get the desync. Could someone help me? Thank you very much.

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf is already scheduled. So, try to call your functions (BIS) instead of spawn them.

Share this post


Link to post
Share on other sites

What's happening is you are flooding the scheduler with too much code/scripts at once and I think that function loops, so it never finishes.

 

There is a limit to how much you can spawn. Depending on whether the code quickly does its' thing and terminates or if it loops will determine how impactful it might be, in an environment where lots of code is being spawned. Looking at your example, I think that's a $#!† ton of spawned code which all loop. You cannot have an infinite amount of looping scripts. I would recommend redesigning what you want to be more simple -- use static markers and make them animate only when you need them to, rather than just doing it for all.

Share this post


Link to post
Share on other sites

I think it is more related to the fact that the markers are set on global, and even if i create them locally, any interaction with them will make them change their status to global again. Therefor, having the marker in global, while the desync clients try to run the code, make the marker to reset the movement everytime a person tries to make move the code. I am trying to make the marker stay locally.

Share this post


Link to post
Share on other sites

You are right. Make sure you create all the markers beforhand locally and then adjust the functions to use local marker commands. For efficiency if you want global marker update, you want to do all local changes first and have only the last change be global. Otherwise every change generates a network traffic with the full marker info.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, Cysiu said:

You are right. Make sure you create all the markers beforhand locally and then adjust the functions to use local marker commands. For efficiency if you want global marker update, you want to do all local changes first and have only the last change be global. Otherwise every change generates a network traffic with the full marker info.

Ok, the problem is that the functions that are used to move the markers are argument global and effects global. And as far as I read in the wiki (the local markers page) it says this:

 

"Local markers have own set of local commands "xxmarkerxxLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker."

 

my question is: Is BIS_fnc_cancelMarker (an example of the multiple functions) considered a global marker command? Does it change the local markers to global? If yes, how can I make it to stay in local (the markers)? Is it something related to remoteExec a solution?

 

My next idea was to use something similar in the movements of markers: 

 

["nato1",(getMarkerPos "avance1"),4] remoteExec ["call BIS_fnc_moveMarker", -2, JIP];

 

But idk if it is gonna work. Anyway, thank you all for the help.

Share this post


Link to post
Share on other sites
3 hours ago, miguel_roman_96@hotmail.com said:

Ok, the problem is that the functions that are used to move the markers are argument global and effects global. And as far as I read in the wiki (the local markers page) it says this:

 

"Local markers have own set of local commands "xxmarkerxxLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker."

 

my question is: Is BIS_fnc_cancelMarker (an example of the multiple functions) considered a global marker command? Does it change the local markers to global? If yes, how can I make it to stay in local (the markers)? Is it something related to remoteExec a solution?

 

My next idea was to use something similar in the movements of markers: 

 

["nato1",(getMarkerPos "avance1"),4] remoteExec ["call BIS_fnc_moveMarker", -2, JIP];

 

But idk if it is gonna work. Anyway, thank you all for the help.

I would open BIS_fnc_cancelMarker in function viewer and make my own version, that make use of local commands.

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Cysiu said:

Use function viewer in editor

thank you so much, I forgot the obvious, already have been 5 days non stop trying to solve that. Sorry hahahaha. I think i am gonna take a break of a couple of days to rest my mind.

Share this post


Link to post
Share on other sites
On 11/8/2020 at 9:30 PM, Cysiu said:

Use function viewer in editor

hey man, How are you?

 

Just wanted to ask you something. I already opened the function as you said, and as we thought there was a command that turned the marker into Global. I already changed it to the LOCAL version. However, I did all that in a SQF document, in which i pasted the whole function with the changes. How should I do now to save it as a new fuction that i can call when i want?

 

Thank you very much.

 

NVMD, i figured out, and it works perfectly. Thank you so much, now i can do the tac ops briefings in multiplayer dedicated servers!

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, miguel_roman_96@hotmail.com said:

NVMD, i figured out, and it works perfectly. Thank you so much, now i can do the tac ops briefings in multiplayer dedicated servers!

Enjoy :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×