mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
more sensible task names
This commit is contained in:
parent
d186afe289
commit
c1bae4eaa5
@ -15,10 +15,55 @@ if (!!(taskIdsArray select _playerno)) exitWith { diag_log format["createObj: Ta
|
||||
_lzLoc = (lzList - [_prevLZ]) call BIS_fnc_SelectRandom;
|
||||
|
||||
|
||||
|
||||
_handle = [(getPos _lzLoc), (playersArray select _playerno), _playerno] execVM 'createSquad.sqf';
|
||||
waitUntil {isNull _handle};
|
||||
_squadArray = squadMDArray select _playerno;
|
||||
_squad = _squadArray select (count _squadArray - 1);
|
||||
|
||||
_lzhot = false;
|
||||
//Make the LZ hot if the roll demands it
|
||||
if ((random 1) < hotLZChance) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'enemySquad.sqf';
|
||||
_lzhot = true;
|
||||
};
|
||||
_lzAA = false;
|
||||
if ((random 1) < AAChance) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'AASquad.sqf';
|
||||
_lzAA = true;
|
||||
};
|
||||
|
||||
landingCompleteArray set [_playerno, false];
|
||||
publicVariable "landingCompleteArray";
|
||||
|
||||
if (bSmoke) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'spawnSmoke.sqf';
|
||||
};
|
||||
|
||||
_shortestDesc = format["LZ %1", lzCounter];
|
||||
_shortdesc = _shortestDesc;
|
||||
_longdesc = _shortdesc;
|
||||
if (!!(ferryingArray select _playerno)) then
|
||||
{
|
||||
diag_log format["creating ferry task for %1 (player %2)", _squad, _playerno];
|
||||
_longdesc = format["%1 wants to fly to this location", _squad];
|
||||
_shortdesc = format["Drop off %1", _squad];
|
||||
} else {
|
||||
diag_log format["creating pickup task for %1 (player %2)", _squad, _playerno];
|
||||
_longdesc = format["%1 is requesting airlift from this location", _squad];
|
||||
_shortdesc = format["Pick up %1", _squad];
|
||||
};
|
||||
|
||||
_taskid = format["p%1_lz%2", _playerno, _lzLoc];
|
||||
[[_player, west],[_taskid],[format["Player %2: Fly to and land within %1m of the LZ", lzSize, _playerno], format["p%1 LZ", _playerno], "LZ"],(getPos _lzLoc),"AUTOASSIGNED",1,true, "move", true] call BIS_fnc_taskCreate;
|
||||
[[_player, west],[_taskid],[_longdesc, _shortdesc, _shortestDesc],(getPos _lzLoc),"AUTOASSIGNED",1,true, "move", true] call BIS_fnc_taskCreate;
|
||||
taskIdsArray set [_playerno, _taskid];
|
||||
|
||||
lzCounter = lzCounter + 1;
|
||||
publicVariable "lzCounter";
|
||||
|
||||
|
||||
_trg = createTrigger["EmptyDetector",getPos _lzLoc, true];
|
||||
_trg setTriggerArea[lzSize,lzSize,0,false];
|
||||
@ -30,28 +75,3 @@ diag_log format["LZ trigger condition: %1", _trgcond];
|
||||
diag_log format["LZ trigger action: %1", _trgaction];
|
||||
_trg setTriggerStatements[_trgcond, _trgaction, ""];
|
||||
trigIdsArray set [_playerno, _trg];
|
||||
|
||||
|
||||
// TODO: delete the trigger when deleting the task on player death or similar
|
||||
|
||||
null = [(getPos _lzLoc), (playersArray select _playerno), _playerno] execVM 'createSquad.sqf';
|
||||
|
||||
//Make the LZ hot if the roll demands it
|
||||
if ((random 1) < hotLZChance) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'enemySquad.sqf';
|
||||
hintSilent "LZ is hot";
|
||||
};
|
||||
if ((random 1) < AAChance) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'AASquad.sqf';
|
||||
hint "LZ has AA!";
|
||||
};
|
||||
|
||||
landingCompleteArray set [_playerno, false];
|
||||
publicVariable "landingCompleteArray";
|
||||
|
||||
if (bSmoke) then
|
||||
{
|
||||
null = [(getPos _lzLoc), _playerno] execVM 'spawnSmoke.sqf';
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ squadLoadedArray = [];
|
||||
playersArray = [];
|
||||
taskIdsArray = [];
|
||||
trigIdsArray = [];
|
||||
|
||||
lzCounter = 1;
|
||||
|
||||
for [{_iX = 0}, {_iX < _maxplayers}, {_iX = _iX + 1}] do
|
||||
{
|
||||
@ -78,6 +78,7 @@ publicVariable "squadLoadedArray";
|
||||
publicVariable "playersArray";
|
||||
publicVariable "taskIdsArray";
|
||||
publicVariable "trigIdsArray";
|
||||
publicVariable "lzCounter";
|
||||
|
||||
missionInitComplete = true;
|
||||
publicVariable "missionInitComplete";
|
||||
|
@ -9,10 +9,10 @@ null = [_taskid, "FAILED", False] spawn BIS_fnc_taskSetState;
|
||||
taskIdsArray set [_playerno, false];
|
||||
|
||||
// for some reason this either like so or with !! causes compile error
|
||||
//if ((trigIdsArray select _playerno)) then
|
||||
//{
|
||||
if (!((trigIdsArray select _playerno) isEqualTo false)) then
|
||||
{
|
||||
deleteVehicle (trigIdsArray select _playerno);
|
||||
//}
|
||||
};
|
||||
trigIdsArray set [_playerno, false];
|
||||
|
||||
publicVariable "taskIdsArray";
|
||||
|
Loading…
Reference in New Issue
Block a user