-
Notifications
You must be signed in to change notification settings - Fork 8
Lucy global functions
Migoyan edited this page Sep 1, 2022
·
6 revisions
Initialise les fonctions de Lucy, les fonctions pourront provoquer des erreurs si celle-ci n'est pas appelée avant.
Exemple
[] call GDC_fnc_lucyInit;
Paramètre | Type | Description | Valeur par défaut |
---|---|---|---|
Délais |
Number | Délais entre chaque spawn d'unité | 1.0 |
Spawn static marqueur |
String | Nom du marqueur pour le spawn static d'unité | "mkr_spawn_static_unit" |
Clean les cadavres |
Bool | Active ou désactive la suppression des cadavres | True |
Timer pour cadavre |
Number | Temps en secondes, entre chaque vérification de suppression des cadavres | 600.0 |
Clean épave |
Bool | Active ou désactive la suppression des véhicules détruits | False |
Timer pour épave |
Number | Temps en secondes, entre chaque vérification de suppression des épaves | 3600.0 |
Désactive Fatigue IA |
Bool | Désactive ou active la fatigue des ias | True |
Clean inventaire véhicule ia |
Bool | Supprime l'inventaire des véhicules spawné par Lucy | True |
Rank du leader ia |
String | Définit le grade des chefs de groupe | "COLONEL" |
Suppression des groupes vides |
Bool | Les groupes crées via LUCY sont supprimés lorsque tous les membres sont morts | False |
Sécurise le lancement d'un script sur HC
Exemple
["script.sqf"] call GDC_fnc_lucyExecVMHC;
Paramètre | Type | Description | Valeur par défaut |
---|---|---|---|
script |
String | Fichier ou commandes à exécuter |
Sécurise le lancement d'un script sur HC depuis n'importe quel contexte
Exemple
["script.sqf"] call GDC_fnc_lucyRemoteExecVMHC;
Paramètre | Type | Description | Valeur par défaut |
---|---|---|---|
script |
String | Fichier ou commandes à exécuter |
Spécifie un script pour charger les loadouts des ia qui spawneront.
Le fichier recevra [unit]
, libre à vous de ne rien faire ou d'écraser selon l'unité qui a été spawn
Exemple
["ia_loadout.sqf"] call GDC_fnc_lucyConfigLoadoutIA;
ia_loadout.sqf
loadoutUS_COMMANDANT =
{
_unit = _this select 0;
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_unit forceAddUniform "rhs_uniform_FROG01_d";
_unit addItemToUniform "ACRE_PRC343";
for "_i" from 1 to 4 do {_unit addItemToUniform "ACE_fieldDressing";};
_unit addItemToUniform "ACE_EarPlugs";
_unit addItemToUniform "ACE_tourniquet";
_unit addItemToUniform "rhsusf_acc_eotech_552";
for "_i" from 1 to 3 do {_unit addItemToUniform "11Rnd_45ACP_Mag";};
_unit addVest "rhsusf_spc_rifleman";
for "_i" from 1 to 2 do {_unit addItemToVest "ACE_CableTie";};
for "_i" from 1 to 6 do {_unit addItemToVest "rhs_mag_30Rnd_556x45_Mk318_Stanag";};
for "_i" from 1 to 3 do {_unit addItemToVest "SmokeShellPurple";};
for "_i" from 1 to 4 do {_unit addItemToVest "rhs_mag_m67";};
_unit addBackpack "rhsusf_assault_eagleaiii_coy";
_unit addItemToBackpack "ACRE_PRC148";
_unit addItemToBackpack "ACRE_PRC148";
for "_i" from 1 to 8 do {_unit addItemToBackpack "rhs_mag_30Rnd_556x45_Mk318_Stanag";};
_unit addHeadgear "H_Beret_Colonel";
_unit addWeapon "rhs_weap_m4a1_carryhandle";
_unit addPrimaryWeaponItem "optic_Hamr";
_unit addWeapon "rhs_weap_M136";
_unit addWeapon "hgun_Pistol_heavy_01_F";
_unit addWeapon "ACE_VectorDay";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
};
_unit = _this select 0;
_unit_classname = typeOf _unit;
switch _unit_classname do
{
case "CUP_O_TK_INS_Commander": {[_unit] call loadoutUS_COMMANDANT};
};
Paramètre | Type | Description | Valeur par défaut |
---|---|---|---|
fichier de loadout |
String | Nom du fichier à exécuter pour s'occuper du loadout |
Exemple avec setUnitLoadout
private ["_unit", "_rifleman", "_rifleman_1", "_AA", "_machine_gunner"];
_rifleman = [
["CUP_arifle_Galil_556_black","","","",["CUP_35Rnd_556x45_Galil_Mag",35],[],""],
[],
[],
["CUP_U_B_BDUv2_ERDL_highland",[["ACE_CableTie",1],["ACE_fieldDressing",5],["ACE_tourniquet",1],["ACE_EarPlugs",1],["SmokeShell",2,1],["CUP_HandGrenade_RGO",1,1]]],
["CUP_V_B_PASGT_CCE",[["CUP_35Rnd_556x45_Galil_Mag",6,35]]],
[],"CUP_H_PASGTv2_ERDL_highland","",[],["ItemMap","","","ItemCompass","ItemWatch",""]
];
_rifleman_1 = [
["CUP_arifle_Galil_black","","","",["CUP_25Rnd_762x51_Galil_Mag",25],[],""],
[],[],["CUP_U_B_BDUv2_ERDL_highland",[["ACE_CableTie",1],["ACE_fieldDressing",5],["ACE_tourniquet",1],["ACE_EarPlugs",1],["SmokeShell",2,1],["CUP_HandGrenade_RGO",1,1]]],
["CUP_V_B_PASGT_CCE",[["CUP_25Rnd_762x51_Galil_Mag",8,25]]],
[],"CUP_H_PASGTv2_ERDL_highland","",[],["ItemMap","","","ItemCompass","ItemWatch",""]
];
_AA = [
["CUP_arifle_Galil_556_black","","","",["CUP_50Rnd_556x45_Galil_Mag",50],[],""],
["CUP_launch_9K32Strela_Loaded","","","",["CUP_Strela_2_M",1],[],""],
[],["CUP_U_B_BDUv2_ERDL_highland",[["ACE_CableTie",1],["ACE_fieldDressing",5],["ACE_tourniquet",1],["ACE_EarPlugs",1],["SmokeShell",2,1],["CUP_HandGrenade_RGO",1,1]]],
["CUP_V_B_PASGT_CCE",[["CUP_50Rnd_556x45_Galil_Mag",7,50]]],[],"CUP_H_PASGTv2_ERDL_highland","",[],["ItemMap","","","ItemCompass","ItemWatch",""]
];
_machine_gunner = [
["CUP_lmg_MG3","","","",["CUP_120Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M",120],[],""],
[],
[],
["CUP_U_B_BDUv2_ERDL_highland",[["ACE_CableTie",1],["ACE_fieldDressing",5],["ACE_tourniquet",1],["ACE_EarPlugs",1],["SmokeShell",2,1],["CUP_HandGrenade_RGO",1,1]]],
["CUP_V_B_PASGT_CCE",[["CUP_120Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M",2,120]]],
["CUP_B_TacticalPack_CCE",[["CUP_120Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M",4,120]]],
"CUP_H_PASGTv2_ERDL_highland","",[],["ItemMap","","","ItemCompass","ItemWatch",""]
];
// 2 - Loadings loadouts
_unit = _this#0;
_unit setUnitLoadout selectRandomWeighted[
_rifleman, .5,
_rifleman_1, .3,
_machine_gunner, .15,
_AA, .05
];
Exemple avec les commandes classiques
private ["_uniform", "_vest", "_helmet", "_face_cover", "_weapon", "_weapon_c", "_launcher"];
_uniform = [
"CUP_U_O_Partisan_VSR_Mixed1",
"U_MU_B_GuerillaGarment6_brown",
"U_MU_B_GuerillaGarment6",
"U_MU_B_GuerillaGarment6_green"
];
_vest = [
"CUP_V_O_SLA_M23_1_OD",
"V_TacVest_oli",
"CUP_V_CDF_6B3_1_FST"
];
_helmet = [
"CUP_H_PMC_Cap_Tan",
"H_Shemag_olive",
"CUP_H_Booniehat_TTS",
"CUP_H_WZ67",
"CUP_H_PMC_Beanie_Black",
""
];
_face_cover = [
"CUP_G_Scarf_Face_Grn",
"H_Shemag_olive",
"",
""
];
_weapon = [
["CUP_arifle_AK47_Early", "CUP_30Rnd_762x39_AK47_M", 7],
["CUP_arifle_AK74_Early", "CUP_30Rnd_545x39_AK_M", 7],
["CUP_arifle_AKM_Early", "CUP_30Rnd_762x39_AK47_bakelite_M", 7],
["CUP_lmg_PKM", "CUP_100Rnd_TE4_LRT4_762x54_PK_Tracer_Green_M", 3],
["CUP_arifle_RPK74", "CUP_75Rnd_TE4_LRT4_Green_Tracer_762x39_RPK_M", 5]
];
_weapon_c = [
["CUP_arifle_Fort222", "CUP_30Rnd_545x39_Fort224_M", 7],
["CUP_lmg_M60", "CUP_100Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M", 3],
["CUP_sgun_M1014_vfg", "CUP_8Rnd_12Gauge_Pellets_No4_Buck", 16]
];
_launcher = ["rhs_weap_rpg7", "rhs_rpg7_PG7VL_mag", "rhs_rpg7_PG7V_mag"];
loadout_chinese = {
private ["_w"];
_w = _weapon_c selectRandomWeighted [.7, .2, .1];
_unit = _this#0;
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_unit addWeapon _w#0;
_unit addPrimaryWeaponItem _w#1;
_unit forceAddUniform "CUP_U_O_SLA_Desert";
_unit addVest "CUP_V_O_SLA_6B3_5_DES";
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_fieldDressing";};
_unit addItemToUniform "ACE_tourniquet";
if (random 1 < .7) then {
_unit addItemToUniform "CUP_HandGrenade_RGO";
};
_unit addItemToUniform "SmokeShell";
for "_i" from 1 to _w#2 do {_unit addItemToVest _w#1;};
_unit addHeadgear "CUP_H_PASGTv2_DCU";
_unit addGoggles "CUP_G_ESS_KHK_Facewrap_Tan";
_unit linkItem "CUP_NVG_1PN138";
if (_w#0 == "CUP_arifle_Fort222") then {
if (random 1 < .6) then {
_unit addPrimaryWeaponItem "CUP_optic_AIMM_COMPM2_BLK";
} else {
_unit addPrimaryWeaponItem "CUP_optic_HoloBlack";
};
};
if (_w#0 == "CUP_lmg_M60") then {
_unit addBackpack "CUP_O_RUS_Patrol_bag_Green";
for "_i" from 1 to _w#2 do {_unit addItemToBackpack _w#1;};
};
_unit linkItem "ItemMap";
_unit linkItem "ItemWatch";
};
loadout_local = {
private ["_u", "_v", "_h", "_fc", "_w"];
_u = selectRandom _uniform;
_v = _vest selectRandomWeighted [.6, .3, .1];
_h = selectRandom _helmet;
_fc = selectRandom _face_cover;
_w = _weapon selectRandomWeighted [.2, .2, .2, .1, .1];
_unit = _this#0;
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_unit addWeapon _w#0;
_unit addPrimaryWeaponItem _w#1;
_unit addPrimaryWeaponItem "CUP_acc_Zenit_2DS";
_unit forceAddUniform _u;
_unit addVest _v;
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_fieldDressing";};
_unit addItemToUniform "ACE_tourniquet";
if (random 1 < .3) then {
_unit addItemToUniform "CUP_HandGrenade_RGO";
};
_unit addItemToUniform "SmokeShell";
for "_i" from 1 to _w#2 do {_unit addItemToVest _w#1;};
_unit addHeadgear _h;
_unit addGoggles _fc;
if (_w#0 == "CUP_lmg_PKM" || _w#0 == "CUP_arifle_RPK74") then {
_unit addBackpack "B_Carryall_cbr";
for "_i" from 1 to _w#2 do {_unit addItemToBackpack _w#1;};
};
_unit linkItem "ItemMap";
_unit linkItem "ItemWatch";
};
// 2 - Loadings loadouts
_unit = _this#0;
_unit_classname = typeOf _unit;
switch _unit_classname do
{
case "O_T_Soldier_F": {[_unit] call loadout_chinese};
case "O_G_Soldier_F": {[_unit] call loadout_local};
case "O_T_Helipilot_F": {[_unit] call loadout_local};
};