small bug fixes

This commit is contained in:
Ghostrider [GRG] 2023-10-12 22:26:59 -04:00
parent d7bf03b38c
commit 81a22451da
3 changed files with 24 additions and 18 deletions

Binary file not shown.

View File

@ -23,13 +23,15 @@ params[
["_backpacks",[]], ["_backpacks",[]],
["_weaponList",[]], ["_weaponList",[]],
["_sideArms",[]], ["_sideArms",[]],
["_scuba",false] ["_scuba",false],
["_timeOut",300],
["_waypointclass","Soldier"]
]; ];
/*
{ {
diag_log format["_fn_spawnGroup: _this %1 = %2",_forEachIndex, _this select _forEachIndex]; diag_log format["_fn_spawnGroup: _this %1 = %2",_forEachIndex, _this select _forEachIndex];
} forEach _this; } forEach _this;
*/
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call GMS_fnc_selectAILoadout}; if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call GMS_fnc_selectAILoadout};
if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call GMS_fnc_selectAISidearms}; if (_sideArms isEqualTo []) then {_sideArms = [_skillLevel] call GMS_fnc_selectAISidearms};
if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call GMS_fnc_selectAIUniforms}; if (_uniforms isEqualTo []) then {_uniforms = [_skillLevel] call GMS_fnc_selectAIUniforms};
@ -39,8 +41,7 @@ if (_backpacks isEqualTo []) then {_backpacks = [_skillLevel] call GMS_fnc_selec
private _difficultyIndex = [_skillLevel] call GMS_fnc_getIndexFromDifficulty; private _difficultyIndex = [_skillLevel] call GMS_fnc_getIndexFromDifficulty;
private "_group"; private _group = [
_group = [
_pos, _pos,
_numberToSpawn, _numberToSpawn,
GMSCore_side, GMSCore_side,
@ -65,7 +66,7 @@ _group setVariable["GMS_difficulty",_skillLevel];
[_group] call GMSCore_fnc_setupGroupBehavior; [_group] call GMSCore_fnc_setupGroupBehavior;
private _skills = missionNamespace getVariable[format["GMS_Skills%1",_skillLevel],GMS_SkillsRed]; private _skills = missionNamespace getVariable[format["GMS_Skills%1",_skillLevel],GMS_SkillsRed];
[_group,_skills] call GMSCore_fnc_setupGroupSkills; [_group,_skills] call GMSCore_fnc_setupGroupSkills;
// TODO: Add Money if any should be added
private _gear = [ private _gear = [
[ [
_weaponList, _weaponList,
@ -96,19 +97,21 @@ private _gear = [
[GMS_loot, 1.0] [GMS_loot, 1.0]
]; ];
[_group,_gear,GMS_launchersPerGroup,GMS_useNVG] call GMSCore_fnc_setupGroupGear; [_group,_gear,GMS_launchersPerGroup,GMS_useNVG] call GMSCore_fnc_setupGroupGear;
private _money = (missionNamespace getVariable[format["GMS_rewards%1",_skillLevel],GMS_rewardsOrange]) select 0;
private _veh = vehicle (leader _group); diag_log format["GMS_fnc_spawnGroup: _money = %1 | _group = %2",_money,_group];
private _type = [_veh] call BIS_fnc_objectType; [_group,_difficulty,_money] call GMSCore_fnc_setupGroupMoney;
_type params["_typeObj","_subtypeObj"]; //private _veh = vehicle (leader _group);
//private _type = [_veh] call BIS_fnc_objectType;
//_type params["_typeObj","_subtypeObj"];
//diag_log format["GMS_fnc_spawnGroup: _veh %3 | _typeObj %1 | _subTypeObj %2",_typeObj,_subtypeObj,_veh]; //diag_log format["GMS_fnc_spawnGroup: _veh %3 | _typeObj %1 | _subTypeObj %2",_typeObj,_subtypeObj,_veh];
private "_waypointClass"; //private "_waypointClass";
switch (_typeObj) do { //switch (_typeObj) do {
case "Soldier": {_waypointClass =_typeObj}; // case "Soldier": {_waypointClass =_typeObj};
case "Vehicle": {_waypointClass = _subtypeObj}; //case "Vehicle": {_waypointClass = _subtypeObj};
case "VehicleAutonomous": {_waypointClass = _subtypeObj}; //case "VehicleAutonomous": {_waypointClass = _subtypeObj};
default {_waypointClass = "Soldier"}; //default {_waypointClass = "Soldier"};
}; //};
/* /*
params[ params[
["_group",grpNull], // group for which to configure / initialize waypoints ["_group",grpNull], // group for which to configure / initialize waypoints
@ -121,7 +124,7 @@ params[
]; ];
*/ */
if !(_areaDimensions isEqualTo []) then {[_group,[],[_pos,_areaDimensions],-1,0,_waypointClass,true] call GMSCore_fnc_initializeWaypointsAreaPatrol}; if !(_areaDimensions isEqualTo []) then {[_group,[],[_pos,_areaDimensions],_timeout,0,_waypointClass,true] call GMSCore_fnc_initializeWaypointsAreaPatrol};
_group selectLeader ((units _group) select 0); _group selectLeader ((units _group) select 0);
//[format["GMS_fnc_spawnGroup: _group = %1",_group]] call GMS_fnc_log; //[format["GMS_fnc_spawnGroup: _group = %1",_group]] call GMS_fnc_log;

View File

@ -158,6 +158,9 @@ switch (GMSCore_modType) do
GMS_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion. GMS_useSignalEnd = true; // When true a smoke grenade/chemlight will appear at the loot crate for 2 min after mission completion.
GMS_missionEndCondition = allUnitsKilled; //allKilledOrPlayerNear; // Options are allUnitsKilled, playerNear, allKilledOrPlayerNear GMS_missionEndCondition = allUnitsKilled; //allKilledOrPlayerNear; // Options are allUnitsKilled, playerNear, allKilledOrPlayerNear
// Added 10/01/23 for those who want some control over the color.
GMS_smokeShellAtCrates = ["SmokeShellOrange","SmokeShellBlue","SmokeShellPurple","SmokeShellRed","SmokeShellGreen","SmokeShellYellow"];
/////////////////////////////// ///////////////////////////////
// General Mission Completion and Loot Settings // General Mission Completion and Loot Settings
/////////////////////////////// ///////////////////////////////