Script para spawnear enemigos especificos / Script to spawn specific enemies
you can add more classes to use with the script
Descarga / Download
Or create a file named codegab_spawnenemies.sqf
/*****************************************************************
Script file for Arma 3
Created by: Codegab
Crea enemigos a partir de un array
Uso sin devolver el grupo / Usage without return the group
[[[25, 342, 0], 0, 2, 8, 6]] execVM "codegab_spawnenemies.sqf";
[[ getmarkerpos "marker_2", 0, 2, 8, 6, 5, 9, 1, 1, 1, 1]] execVM "codegab_spawnenemies.sqf";
Si queremos que nos devuelva el grupo / If we want the returning group
En Init.sqf / In init.sqf
codegab_spawnenemies = compile preprocessFile "code_spawnenemies.sqf";
llamo la funcion / call the function
_grupo =[[posicion, 0, 2, 8, 6]] call codegab_spawnenemies;
_grupo = [[ getmarkerpos "marker_2", 0, 2, 8, 6, 5, 9, 1, 1, 1, 1]] call codegab_spawnenemies;
/***************************************************************/
//posibles enemigos CSAT:
0 = O_G_Soldier_lite_F Rifleman (Light)
1 = O_G_Soldier_SL_F Squad Leader
2 = O_G_Soldier_TL_F Team Leader
3 = O_G_Soldier_AR_F Autorifleman
4 = O_G_medic_F Combat Life Saver
5 = O_G_engineer_F Engineer
6 = O_G_Soldier_exp_F Explosive Specialist
7 = O_G_Soldier_GL_F Grenadier
8 = O_G_Soldier_M_F Marksman
9 = O_G_Soldier_LAT_F Rifleman (AT)
10 = O_G_Soldier_A_F Ammo Bearer
11 = O_G_officer_F Officer
12 = O_G_Soldier_unarmed_F Rifleman (Unarmed)
13 = O_G_Survivor_F Survivor
//CUP Takistani Militia
21 = CUP_O_TK_INS_Soldier_AA Specialist
22 = CUP_O_TK_INS_Soldier_AR Automatic rifleman
23 = CUP_O_TK_INS_Gerrilla_Medic Bonnester
24 = CUP_O_TK_INS_Soldier_MG Maachinegunner
25 = CUP_O_TK_INS_Bomber Militia bomb builder
26 = CUP_O_TK_INS_Mechanic Militia mechanic
27 = CUP_O_TK_INS_Soldier_GL AK74 GL
28 = CUP_O_TK_INS_Soldier AK 74
29 = CUP_O_TK_INS_Soldier_FNFAL FN Fal
30 = CUP_O_TK_INS_Soldier_Enfield Lee-Enfield
31 = CUP_O_TK_INS_Soldier_AAT RPG Ammo
32 = CUP_O_TK_INS_Soldier_AT RPG 7
33 = CUP_O_TK_INS_Sniper Sniper
34 = CUP_O_TK_INS_Soldier_tL Team leader
35 = CUP_O_TK_INS_Commander Warlord
*/
Params ["_array"];
_posicion = _array deleteAT 0;
_group = createGroup [east, true]; //creo el grupo al que van a pertenecer, bando este
{
_unit = nil;
switch (_x) do {
case 0: {_unit = "O_G_Soldier_lite_F";};
case 1: {_unit = "O_G_Soldier_SL_F";};
case 2: {_unit = "O_G_Soldier_TL_F";};
case 3: {_unit = "O_G_Soldier_AR_F";};
case 4: {_unit = "O_G_medic_F";};
case 5: {_unit = "O_G_engineer_F";};
case 6: {_unit = "O_G_Soldier_exp_F";};
case 7: {_unit = "O_G_Soldier_GL_F";};
case 8: {_unit = "O_G_Soldier_M_F";};
case 9: {_unit = "O_G_Soldier_LAT_F";};
case 10: {_unit = "O_G_Soldier_A_F";};
case 11: {_unit = "O_G_officer_F";};
case 12: {_unit = "O_G_Soldier_unarmed_F";};
case 13: {_unit = "O_G_Survivor_F";};
case 21: {_unit = "CUP_O_TK_INS_Soldier_AA";};
case 22: {_unit = "CUP_O_TK_INS_Soldier_AR";};
case 23: {_unit = "CUP_O_TK_INS_Gerrilla_Medic";};
case 24: {_unit = "CUP_O_TK_INS_Soldier_MG";};
case 25: {_unit = "CUP_O_TK_INS_Bomber";};
case 26: {_unit = "CUP_O_TK_INS_Mechanic";};
case 27: {_unit = "CUP_O_TK_INS_Soldier_GL";};
case 28: {_unit = "CUP_O_TK_INS_Soldier";};
case 29: {_unit = "CUP_O_TK_INS_Soldier_FNFAL";};
case 30: {_unit = "CUP_O_TK_INS_Soldier_Enfield";};
case 31: {_unit = "CUP_O_TK_INS_Soldier_AAT";};
case 32: {_unit = "CUP_O_TK_INS_Soldier_AT";};
case 33: {_unit = "CUP_O_TK_INS_Sniper";};
case 34: {_unit = "CUP_O_TK_INS_Soldier_tL";};
case 35: {_unit = "CUP_O_TK_INS_Commander";};
default {_unit = "O_G_Soldier_lite_F";};
};
//crea un enemigo en _posicion
_unit createunit [_posicion, _group];
} forEach _array;
//devuelvo el grupo
_group;
/***************************************************************/
No hay comentarios:
Publicar un comentario