mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
Addon support
This commit is contained in:
parent
650eb1ae78
commit
266d94792e
@ -9,9 +9,8 @@
|
||||
_this select 1: SCALAR - how many groups to spawn
|
||||
_this select 2: SCALAR - how many units to put in each group
|
||||
_this select 3: SCALAR - AI mode
|
||||
_this select 4: STRING - exact config name of mission
|
||||
_this select 4: STRING - exact config name of mission or addon
|
||||
_this select 5: SCALAR - (optional) altitude to create units at
|
||||
_this select 6: SCALAR - (optional) spawn radius
|
||||
|
||||
Returns:
|
||||
ARRAY with group(s)
|
||||
@ -20,7 +19,7 @@
|
||||
private [ "_r", "_allUnits" ];
|
||||
params [ "_this0", "_this1", "_this2", "_this3", "_this4", "_this5", "_this6" ];
|
||||
_allUnits = [];
|
||||
if ( ( _this4 in ( "missionList" call VEMFr_fnc_config ) ) OR ( _this4 isEqualTo "Static" ) ) then
|
||||
if ( ( _this4 in ( "missionList" call VEMFr_fnc_config ) ) OR ( _this4 isEqualTo "Static" ) OR ( _this4 in ( "addons" call VEMFr_fnc_config ) ) ) then
|
||||
{
|
||||
scopeName "outer";
|
||||
_r = [];
|
||||
@ -35,7 +34,7 @@ if ( ( _this4 in ( "missionList" call VEMFr_fnc_config ) ) OR ( _this4 isEqualTo
|
||||
_grp allowFleeing 0;
|
||||
for "_u" from 1 to _this2 do
|
||||
{
|
||||
_unit = _grp createUnit [ ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0, _this0, [], if not ( isNil "_this6" ) then { _this6 } else { 5 }, "FORM" ]; // Create Unit There
|
||||
_unit = _grp createUnit [ ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0, _this0, [], 0, "FORM" ]; // Create Unit There
|
||||
_allUnits pushBack _unit;
|
||||
_unit addMPEventHandler [ "mpkilled", "if isDedicated then { [ _this select 0 ] ExecVM ( 'handleKillCleanup' call VEMFr_fnc_scriptPath ); [ _this select 0, name (_this select 0), _this select 1, name (_this select 1) ] ExecVM ( 'handleKillReward' call VEMFr_fnc_scriptPath ); ( _this select 0 ) removeAllEventHandlers 'MPKilled' }" ];
|
||||
// Set skills
|
||||
@ -54,7 +53,7 @@ if ( ( _this4 in ( "missionList" call VEMFr_fnc_config ) ) OR ( _this4 isEqualTo
|
||||
_unit enableAI "AUTOTARGET";
|
||||
_unit enableAI "MOVE";
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "TEAMSWITCH";
|
||||
_unit disableAI "TEAMSWITCH";
|
||||
_unit enableAI "FSM";
|
||||
_unit enableAI "AIMINGERROR";
|
||||
_unit enableAI "SUPPRESSION";
|
||||
|
Loading…
Reference in New Issue
Block a user