I prefer to left the script here, so anybody can use it.
In this case there are 6 firing camps (sniper ..mg ..... )
Things to take care of:
- each targetE has a var name, use your owns to identify each target.
in this case ... for "campo1" the var names of the targetE objects are:
ac_1
ac_2
ac_3
....
- As you can see i have use two ways to respawn the targets...
one by one (ac_1 SetDammage 0.0;)
and using and array of objects with a foreach sentence:
_ldra4 = [ra_31,ra_32,ra_33,ra_34,ra_35,ra_36,ra_37,ra_38,ra_39]
"_x setDammage 0.0" foreach _ldra4
this second one is more clean
If there is something that you don't understand.. please ask.. I'll try to do my best with my english.
; *****************************************************
; ** Autor: Flaber
; ** - 13ª Compañia TigerSharks -
; ** web: www.mtpstudios.net - www.ffaa.es
; *****************************************************
; ** Campo de tiro
; *****************************************************
; ** Ejecución del script (Execution)
; ** [_campo] exec "CampoDeTiro.sqs";
; ** Ejemplo (Example)
; ** [1] exec "CampoDeTiro.sqs";
; *****************************************************
; ** Necesitas una variable logica llamada "server"
; ** Hay varios campos de tiro, llama al script indicando el campo de tiro del que quieres levantar la dianas.
; ** cada campo de tiro tiene los nombres de las dianas que se corresponden.
; *****************************************************
; ** You Need a gameLogic called "server"
; ** There a few firing camps, call the script saying the firing camp whos targets will pop up
; ** Each firing camp has the var names of the targets which compose the camp.
; *****************************************************
_campo = _this select 0;
?!local server : goto "end" ;
? (_campo == 1): goto "campo1";
? (_campo == 2): goto "campo2";
? (_campo == 3): goto "campo3";
? (_campo == 4): goto "campo4";
? (_campo == 5): goto "campo5";
? (_campo == 6): goto "campo6";
; Campo de tiro de pistola (Pistol Firing Camp)
#campo1
ac_1 SetDammage 0.0;
ac_2 SetDammage 0.0;
ac_3 SetDammage 0.0;
ac_4 SetDammage 0.0;
ac_5 SetDammage 0.0;
ac_6 SetDammage 0.0;
ac_7 SetDammage 0.0;
ac_8 SetDammage 0.0;
ac_9 SetDammage 0.0;
ac_10 SetDammage 0.0;
goto "end"
; Campo de tiro Francotirador (Sniper Firing Camp)
#campo2
fr_1 SetDammage 0.0;
fr_2 SetDammage 0.0;
fr_3 SetDammage 0.0;
fr_4 SetDammage 0.0;
fr_5 SetDammage 0.0;
fr_6 SetDammage 0.0;
fr_7 SetDammage 0.0;
goto "end"
; Campo de tiro MA1A1 (Tank Firing Camp)
#campo3
bl1 SetDammage 0.0;
bl2 SetDammage 0.0;
bl3 SetDammage 0.0;
bl4 SetDammage 0.0;
bl5 SetDammage 0.0;
bl6 SetDammage 0.0;
goto "end"
; Campo de tiro Ametralladora pesada (MG Firing Camp)
#campo4
mg_1 SetDammage 0.0;
mg_2 SetDammage 0.0;
mg_3 SetDammage 0.0;
mg_4 SetDammage 0.0;
mg_5 SetDammage 0.0;
mg_6 SetDammage 0.0;
mg_7 SetDammage 0.0;
mg_8 SetDammage 0.0;
mg_9 SetDammage 0.0;
mg_10 SetDammage 0.0;
goto "end"
; Campo de tiro sub-fusil
#campo5
_ldra1 = [ra_1,ra_2,ra_3,ra_4,ra_5,ra_6,ra_7,ra_8,ra_9]
_ldra2 = [ra_11,ra_12,ra_13,ra_14,ra_15,ra_16,ra_17,ra_18,ra_19]
_ldra3 = [ra_21,ra_22,ra_23,ra_24,ra_25,ra_26,ra_27,ra_28,ra_29]
"_x setDammage 0.0" foreach _ldra1
"_x setDammage 0.0" foreach _ldra2
"_x setDammage 0.0" foreach _ldra3
goto "end"
; Campo de tiro fusil
#campo6
_ldra4 = [ra_31,ra_32,ra_33,ra_34,ra_35,ra_36,ra_37,ra_38,ra_39]
_ldra5 = [ra_41,ra_42,ra_43,ra_44,ra_45,ra_46,ra_47,ra_48,ra_49]
_ldra6 = [ra_51,ra_52,ra_53,ra_54,ra_55,ra_56,ra_57,ra_58,ra_59]
"_x setDammage 0.0" foreach _ldra4
"_x setDammage 0.0" foreach _ldra5
"_x setDammage 0.0" foreach _ldra6
goto "end"
#end
exit