mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
wip
This commit is contained in:
parent
d40ff01b70
commit
060d3c5388
@ -1,4 +1,4 @@
|
|||||||
diag_log format["createDropoffLZ called, _this: %1", _this];
|
//diag_log format["createDropoffLZ called, _this: %1", _this];
|
||||||
private _lzLocation = _this select 0;
|
private _lzLocation = _this select 0;
|
||||||
private _bindToVehicle = _this select 1;
|
private _bindToVehicle = _this select 1;
|
||||||
private _bindToSquad = _this select 2;
|
private _bindToSquad = _this select 2;
|
||||||
@ -45,7 +45,7 @@ private _assignTo = [_assignToPlayer, west];
|
|||||||
// PONDER: make a parent task "ferry squad X" ??
|
// PONDER: make a parent task "ferry squad X" ??
|
||||||
private _taskid = format["dropoff_%1", lzCounter];
|
private _taskid = format["dropoff_%1", lzCounter];
|
||||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],getPos _lzLocation,"CREATED",(STARTPRIORITY-lzCounter),true, _taskType, true] call BIS_fnc_taskCreate;
|
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],getPos _lzLocation,"CREATED",(STARTPRIORITY-lzCounter),true, _taskType, true] call BIS_fnc_taskCreate;
|
||||||
_assignToPlayer setCurrentTask _taskid;
|
//_assignToPlayer setCurrentTask _taskid;
|
||||||
|
|
||||||
private _trg = createTrigger["EmptyDetector",getPos _lzLocation, false];
|
private _trg = createTrigger["EmptyDetector",getPos _lzLocation, false];
|
||||||
_trg setTriggerArea[lzSize,lzSize,0,false];
|
_trg setTriggerArea[lzSize,lzSize,0,false];
|
||||||
@ -60,7 +60,7 @@ scopeName "main";
|
|||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
scopeName "mainloop";
|
scopeName "mainloop";
|
||||||
diag_log format["createDropoffLZ: ticking %1", _this];
|
//diag_log format["createDropoffLZ: ticking %1", _this];
|
||||||
|
|
||||||
if (( _taskid call BIS_fnc_taskCompleted)) then
|
if (( _taskid call BIS_fnc_taskCompleted)) then
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
diag_log format["createPickupLZ called, _this: %1", _this];
|
//diag_log format["createPickupLZ called, _this: %1", _this];
|
||||||
private _lzLocation = _this select 0;
|
private _lzLocation = _this select 0;
|
||||||
private _assignExtra = _this select 1;
|
private _assignExtra = _this select 1;
|
||||||
|
|
||||||
@ -12,13 +12,16 @@ if ((random 1) < hotLZChance) then
|
|||||||
_lzhot = true
|
_lzhot = true
|
||||||
};
|
};
|
||||||
private _lzAA = false;
|
private _lzAA = false;
|
||||||
|
private _taskType = "move";
|
||||||
if ((random 1) < AAChance) then
|
if ((random 1) < AAChance) then
|
||||||
{
|
{
|
||||||
_lzhot = true;
|
_lzhot = true;
|
||||||
_lzAA = true;
|
_lzAA = true;
|
||||||
};
|
};
|
||||||
|
private _taskType = "move";
|
||||||
if (_lzhot) then
|
if (_lzhot) then
|
||||||
{
|
{
|
||||||
|
_taskType = "defend";
|
||||||
_enemies = _enemies + ([_lzLocation, _lzAA] call createEnemySquads);
|
_enemies = _enemies + ([_lzLocation, _lzAA] call createEnemySquads);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -56,7 +59,10 @@ if (!(_assignExtra isEqualTo false)) then
|
|||||||
// PONDER: make a parent task "ferry squad X" ??
|
// PONDER: make a parent task "ferry squad X" ??
|
||||||
private _taskid = format["pickup_%1", lzCounter];
|
private _taskid = format["pickup_%1", lzCounter];
|
||||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],getPos _lzLocation,"AUTOASSIGNED",(STARTPRIORITY-lzCounter),true, "meet", true] call BIS_fnc_taskCreate;
|
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],getPos _lzLocation,"AUTOASSIGNED",(STARTPRIORITY-lzCounter),true, "meet", true] call BIS_fnc_taskCreate;
|
||||||
(_assignExtra select 0) setCurrentTask _taskid;
|
if (!(_assignExtra isEqualTo false)) then
|
||||||
|
{
|
||||||
|
// (_assignExtra select 0) setCurrentTask _taskid;
|
||||||
|
};
|
||||||
|
|
||||||
if (bSmoke) then
|
if (bSmoke) then
|
||||||
{
|
{
|
||||||
@ -75,7 +81,7 @@ scopeName "main";
|
|||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
scopeName "mainloop";
|
scopeName "mainloop";
|
||||||
diag_log format["createPickupLZ: ticking %1", _this];
|
//diag_log format["createPickupLZ: ticking %1", _this];
|
||||||
|
|
||||||
if (( _taskid call BIS_fnc_taskCompleted)) then
|
if (( _taskid call BIS_fnc_taskCompleted)) then
|
||||||
{
|
{
|
||||||
@ -94,7 +100,9 @@ while {true} do
|
|||||||
if (triggerActivated _trg) then
|
if (triggerActivated _trg) then
|
||||||
{
|
{
|
||||||
diag_log format["createPickupLZ: triggedred, loading up %1", _squad];
|
diag_log format["createPickupLZ: triggedred, loading up %1", _squad];
|
||||||
|
// TODO: Filter the list so that locations near currently active tasks are not considered
|
||||||
private _newLZLocation = (lzList - [_lzLocation]) call BIS_fnc_SelectRandom;
|
private _newLZLocation = (lzList - [_lzLocation]) call BIS_fnc_SelectRandom;
|
||||||
|
|
||||||
private _veh = [list _trg] call playerVehicleInList;
|
private _veh = [list _trg] call playerVehicleInList;
|
||||||
private _handle = [_veh, _squad, _taskid] spawn loadSquad;
|
private _handle = [_veh, _squad, _taskid] spawn loadSquad;
|
||||||
waitUntil {isNull _handle};
|
waitUntil {isNull _handle};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
diag_log format["ejectSquad called, _this: %1", _this];
|
//diag_log format["ejectSquad called, _this: %1", _this];
|
||||||
private _lz = _this select 0;
|
private _lz = _this select 0;
|
||||||
private _vehicle = _this select 1;
|
private _vehicle = _this select 1;
|
||||||
private _squad = _this select 2;
|
private _squad = _this select 2;
|
||||||
@ -22,7 +22,7 @@ scopeName "main";
|
|||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
scopeName "ejectloop";
|
scopeName "ejectloop";
|
||||||
diag_log format["ejectSquad: ticking %1", _this];
|
// diag_log format["ejectSquad: ticking %1", _this];
|
||||||
if (({(_x in _vehicle) && (alive _x)} count units _squad) == 0) then
|
if (({(_x in _vehicle) && (alive _x)} count units _squad) == 0) then
|
||||||
{
|
{
|
||||||
// No squad units left alive inside
|
// No squad units left alive inside
|
||||||
@ -34,4 +34,4 @@ while {true} do
|
|||||||
|
|
||||||
[_squadCmdr, format["%1, everyone is out, you're clear to lift off", name _pilot]] remoteExec ['sideChat', _side];
|
[_squadCmdr, format["%1, everyone is out, you're clear to lift off", name _pilot]] remoteExec ['sideChat', _side];
|
||||||
|
|
||||||
diag_log format["ejectSquad done, _this: %1", _this];
|
//diag_log format["ejectSquad done, _this: %1", _this];
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
// Load the briefing (it will wait for the player object)
|
// Load the briefing (it will wait for the player object)
|
||||||
execVM "briefing.sqf";
|
execVM "briefing.sqf";
|
||||||
|
player addRating 9999;
|
||||||
|
20
helotraining_rewrite.Altis/isLanded.sqf
Normal file
20
helotraining_rewrite.Altis/isLanded.sqf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diag_log format["isLanded called, _this: %1", _this];
|
||||||
|
private _vehicle = _this select 0;
|
||||||
|
private _returnValue = false;
|
||||||
|
|
||||||
|
private _altitude = (getPosATL _vehicle) select 2;
|
||||||
|
private _isSlow = true;
|
||||||
|
{
|
||||||
|
if (_x > 0.5) then
|
||||||
|
{
|
||||||
|
_isSlow = false;
|
||||||
|
}
|
||||||
|
} forEach (velocity _vehicle);
|
||||||
|
|
||||||
|
if (_isSlow && (_altitude < 1)) then
|
||||||
|
{
|
||||||
|
_returnValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
diag_log format["isLanded returning: %1", _returnValue];
|
||||||
|
_returnValue
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
diag_log format["playerVehicleInList called, _this: %1", _this];
|
//diag_log format["playerVehicleInList called, _this: %1", _this];
|
||||||
private _triggerList = _this select 0;
|
private _triggerList = _this select 0;
|
||||||
private _returnValue = false;
|
private _returnValue = false;
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ scopeName "main";
|
|||||||
{
|
{
|
||||||
private _plr = _x;
|
private _plr = _x;
|
||||||
private _veh = vehicle _plr;
|
private _veh = vehicle _plr;
|
||||||
if ( (_plr != _veh) && (isTouchingGround _veh) && (_veh in _triggerList) ) then
|
if ( (_plr != _veh) && (isLanded _veh) && (_veh in _triggerList) ) then
|
||||||
{
|
{
|
||||||
_returnValue = _veh;
|
_returnValue = _veh;
|
||||||
breakTo "main";
|
breakTo "main";
|
||||||
|
@ -13,6 +13,8 @@ playerVehicleInList = compile preProcessfile "playerVehicleInList.sqf";
|
|||||||
playerVehicleInListBool = compile preProcessfile "playerVehicleInListBool.sqf";
|
playerVehicleInListBool = compile preProcessfile "playerVehicleInListBool.sqf";
|
||||||
getSideTasks = compile preProcessfile "getSideTasks.sqf";
|
getSideTasks = compile preProcessfile "getSideTasks.sqf";
|
||||||
getSideActiveTasks = compile preProcessfile "getSideActiveTasks.sqf";
|
getSideActiveTasks = compile preProcessfile "getSideActiveTasks.sqf";
|
||||||
|
isLanded = compile preProcessfile "isLanded.sqf";
|
||||||
|
selectLZ = compile preProcessfile "selectLZ.sqf";
|
||||||
|
|
||||||
taskSpawner = compile preProcessfile "taskSpawner.sqf";
|
taskSpawner = compile preProcessfile "taskSpawner.sqf";
|
||||||
xenoRepair = compile preProcessfile "xenoRepair.sqf";
|
xenoRepair = compile preProcessfile "xenoRepair.sqf";
|
||||||
|
13
helotraining_rewrite.Altis/selectLZ.sqf
Normal file
13
helotraining_rewrite.Altis/selectLZ.sqf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diag_log format["selectLZ called, _this: %1", _this];
|
||||||
|
private _excludeList = _this select 0;
|
||||||
|
private _returnValue = false;
|
||||||
|
|
||||||
|
private _candidates = lzList - _excludeList;
|
||||||
|
private _tasks = [west] call getSideActiveTasks;
|
||||||
|
|
||||||
|
scopeName "main";
|
||||||
|
while {true};
|
||||||
|
|
||||||
|
|
||||||
|
diag_log format["selectLZ returning: %1", _returnValue];
|
||||||
|
_returnValue
|
@ -1,4 +1,4 @@
|
|||||||
diag_log format["spawnSmokeBySquad called, _this: %1", _this];
|
//diag_log format["spawnSmokeBySquad called, _this: %1", _this];
|
||||||
private _bindToSquad = _this select 0;
|
private _bindToSquad = _this select 0;
|
||||||
private _smokeTgt = _this select 1;
|
private _smokeTgt = _this select 1;
|
||||||
private _smokeLocation = getPos _smokeTgt;
|
private _smokeLocation = getPos _smokeTgt;
|
||||||
@ -12,7 +12,7 @@ private _keepSpawning = true;
|
|||||||
// TODO: switch color based on arguments
|
// TODO: switch color based on arguments
|
||||||
while {_keepSpawning} do
|
while {_keepSpawning} do
|
||||||
{
|
{
|
||||||
diag_log format["spawnSmokeBySquad: spawning smoke to %1", _smokeLocation];
|
//diag_log format["spawnSmokeBySquad: spawning smoke to %1", _smokeLocation];
|
||||||
_hour = daytime;
|
_hour = daytime;
|
||||||
if (_hour > 5 && _hour < 19) then
|
if (_hour > 5 && _hour < 19) then
|
||||||
{
|
{
|
||||||
@ -36,5 +36,5 @@ while {_keepSpawning} do
|
|||||||
};
|
};
|
||||||
} forEach (units _bindToSquad);
|
} forEach (units _bindToSquad);
|
||||||
};
|
};
|
||||||
diag_log format["spawnSmokeBySquad done, _this: %1", _this];
|
//diag_log format["spawnSmokeBySquad done, _this: %1", _this];
|
||||||
deleteVehicle _trg;
|
deleteVehicle _trg;
|
||||||
|
@ -8,6 +8,7 @@ while {true} do
|
|||||||
while {count ([west] call getSideActiveTasks) < count _justPlayers} do
|
while {count ([west] call getSideActiveTasks) < count _justPlayers} do
|
||||||
{
|
{
|
||||||
scopename "spawnloop";
|
scopename "spawnloop";
|
||||||
|
// TODO: Filter the list so that locations near currently active tasks are not considered
|
||||||
private _newLZLocation = lzList call BIS_fnc_SelectRandom;
|
private _newLZLocation = lzList call BIS_fnc_SelectRandom;
|
||||||
private _plrAssigned = false;
|
private _plrAssigned = false;
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user