mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
improvements and fixes
This commit is contained in:
parent
0e29582b38
commit
d40ff01b70
@ -44,7 +44,8 @@ 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,"AUTOASSIGNED",1,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;
|
||||||
|
|
||||||
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];
|
||||||
|
@ -25,16 +25,24 @@ if (_lzhot) then
|
|||||||
lzCounter = lzCounter + 1;
|
lzCounter = lzCounter + 1;
|
||||||
publicVariable "lzCounter";
|
publicVariable "lzCounter";
|
||||||
|
|
||||||
|
private _side = side _squad;
|
||||||
|
private _squadCmdr = (units _squad) select 0;
|
||||||
|
private _lzLocationName = text ((nearestLocations [getPos _lzLocation, ["NameCityCapital", "NameCity", "NameVillage"], 1500]) select 0);
|
||||||
|
[[_side, "HQ"], format["%1 is requesting pickup from near %2", groupId _squad, _lzLocationName]] remoteExec ["sideChat", _side];
|
||||||
|
|
||||||
|
|
||||||
private _shortestDesc = format["LZ %1", lzCounter];
|
private _shortestDesc = format["LZ %1", lzCounter];
|
||||||
private _longdesc = format["%1 wants a pickup from this location", _squad];
|
private _longdesc = format["%1 wants a pickup from this location", _squad];
|
||||||
private _shortdesc = format["Pick up %1", _squad];
|
private _shortdesc = format["Pick up %1", _squad];
|
||||||
if (_lzAA and _lzhot) then
|
if (_lzAA and _lzhot) then
|
||||||
{
|
{
|
||||||
_longdesc = _longdesc + "<br/><strong>Be advised:</strong> Intel reports heavy enemy activity with AA assets at the location";
|
_longdesc = _longdesc + "<br/><strong>Be advised:</strong> Intel reports heavy enemy activity with AA assets at the location";
|
||||||
|
[_squadCmdr, "Be advised, LZ is very hot with AA assets present"] remoteExec ["sideChat", _side];
|
||||||
};
|
};
|
||||||
if (!_lzAA and _lzhot) then
|
if (!_lzAA and _lzhot) then
|
||||||
{
|
{
|
||||||
_longdesc = _longdesc + "<br/><strong>Be advised:</strong> Intel reports enemy activity at the location";
|
_longdesc = _longdesc + "<br/><strong>Be advised:</strong> Intel reports enemy activity at the location";
|
||||||
|
[_squadCmdr, "Be advised, LZ is hot"] remoteExec ["sideChat", _side];
|
||||||
};
|
};
|
||||||
|
|
||||||
private _assignTo = [west];
|
private _assignTo = [west];
|
||||||
@ -43,9 +51,12 @@ if (!(_assignExtra isEqualTo false)) then
|
|||||||
_assignTo = _assignTo + _assignExtra;
|
_assignTo = _assignTo + _assignExtra;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 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",1,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 (bSmoke) then
|
if (bSmoke) then
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,9 @@ 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;
|
||||||
private _fromTaskId = _this select 3;
|
private _fromTaskId = _this select 3;
|
||||||
|
private _pilot = driver _vehicle;
|
||||||
|
private _side = side _squad;
|
||||||
|
private _squadCmdr = (units _squad) select 0;
|
||||||
|
|
||||||
deleteWaypoint [_squad,1];
|
deleteWaypoint [_squad,1];
|
||||||
|
|
||||||
@ -13,6 +16,8 @@ deleteWaypoint [_squad,1];
|
|||||||
private _wp = _squad addwaypoint [_lz,5,1];
|
private _wp = _squad addwaypoint [_lz,5,1];
|
||||||
_wp setwaypointType "MOVE";
|
_wp setwaypointType "MOVE";
|
||||||
|
|
||||||
|
[_squadCmdr, format["%1, please standby as we're getting off.", name _pilot]] remoteExec ['sideChat', _side];
|
||||||
|
|
||||||
scopeName "main";
|
scopeName "main";
|
||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
@ -26,4 +31,7 @@ while {true} do
|
|||||||
};
|
};
|
||||||
sleep 2;
|
sleep 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[_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,18 +1,19 @@
|
|||||||
// Config constant globals
|
// Config constant globals
|
||||||
LZCOUNT = 86;
|
LZCOUNT = 86;
|
||||||
|
STARTPRIORITY = 1000;
|
||||||
|
|
||||||
// Precompile code
|
// Precompile code
|
||||||
execVM "precompile.sqf";
|
execVM "precompile.sqf";
|
||||||
|
|
||||||
//Handle MP parameters
|
|
||||||
execVM "readparams.sqf";
|
|
||||||
|
|
||||||
// We can't run this before
|
// We can't run this before
|
||||||
if (isServer) then
|
if (isServer) then
|
||||||
{
|
{
|
||||||
|
//Handle MP parameters
|
||||||
|
_handle = execVM "readparams.sqf";
|
||||||
|
waitUntil {isNull _handle};
|
||||||
execVM "taskSpawner.sqf";
|
execVM "taskSpawner.sqf";
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flag init complete
|
// Flag init complete
|
||||||
missionInitComplete = true;
|
missionInitComplete = true;
|
||||||
publicVariable "missionInitComplete";
|
publicVariable "missionInitComplete";
|
||||||
|
@ -1 +1,3 @@
|
|||||||
// This is actually a bit early to do anything.
|
// Keep track of how many LZ we have created, used to give tasks unique names and priorities
|
||||||
|
lzCounter = 0;
|
||||||
|
publicVariable "lzCounter";
|
||||||
|
@ -2,6 +2,10 @@ diag_log format["loadSquad called, _this: %1", _this];
|
|||||||
private _vehicle = _this select 0;
|
private _vehicle = _this select 0;
|
||||||
private _squad = _this select 1;
|
private _squad = _this select 1;
|
||||||
private _fromTaskId = _this select 2;
|
private _fromTaskId = _this select 2;
|
||||||
|
private _pilot = driver _vehicle;
|
||||||
|
private _side = side _squad;
|
||||||
|
private _squadCmdr = (units _squad) select 0;
|
||||||
|
|
||||||
|
|
||||||
{_x assignAsCargo _vehicle} foreach units _squad;
|
{_x assignAsCargo _vehicle} foreach units _squad;
|
||||||
{[_x] ordergetin true} foreach units _squad;
|
{[_x] ordergetin true} foreach units _squad;
|
||||||
@ -10,6 +14,8 @@ private _fromTaskId = _this select 2;
|
|||||||
private _wp = _squad addwaypoint [_vehicle,5,1];
|
private _wp = _squad addwaypoint [_vehicle,5,1];
|
||||||
_wp setwaypointType "GETIN";
|
_wp setwaypointType "GETIN";
|
||||||
|
|
||||||
|
[_squadCmdr, format["%1, please standby as we're loading up.", name _pilot]] remoteExec ["sideChat", _side];
|
||||||
|
|
||||||
scopeName "main";
|
scopeName "main";
|
||||||
while {true} do
|
while {true} do
|
||||||
{
|
{
|
||||||
@ -29,4 +35,7 @@ while {true} do
|
|||||||
};
|
};
|
||||||
sleep 2;
|
sleep 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[_squadCmdr, format["%1, everyone is onboard, you're clear to lift off", name _pilot]] remoteExec ["sideChat", _side];
|
||||||
|
|
||||||
diag_log format["loadSquad done, _this: %1", _this];
|
diag_log format["loadSquad done, _this: %1", _this];
|
||||||
|
@ -8,7 +8,7 @@ class EditorData
|
|||||||
toggles=1;
|
toggles=1;
|
||||||
class ItemIDProvider
|
class ItemIDProvider
|
||||||
{
|
{
|
||||||
nextID=134;
|
nextID=147;
|
||||||
};
|
};
|
||||||
class MarkerIDProvider
|
class MarkerIDProvider
|
||||||
{
|
{
|
||||||
@ -16,10 +16,10 @@ class EditorData
|
|||||||
};
|
};
|
||||||
class Camera
|
class Camera
|
||||||
{
|
{
|
||||||
pos[]={14253.876,161.88496,15821.944};
|
pos[]={14290.831,164.33411,15773.51};
|
||||||
dir[]={0.081877343,-0.63147533,0.7711519};
|
dir[]={-0.18160321,-0.59209311,0.78515315};
|
||||||
up[]={0.066685185,0.77530128,0.62804556};
|
up[]={-0.13343464,0.80584365,0.57689732};
|
||||||
aside[]={0.99447972,4.1961903e-007,-0.10559266};
|
aside[]={0.97428519,1.8044375e-009,0.22534904};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
binarizationWanted=0;
|
binarizationWanted=0;
|
||||||
@ -36,13 +36,14 @@ addons[]=
|
|||||||
"A3_Modules_F_Multiplayer",
|
"A3_Modules_F_Multiplayer",
|
||||||
"A3_Characters_F",
|
"A3_Characters_F",
|
||||||
"A3_Modules_F",
|
"A3_Modules_F",
|
||||||
"cba_main"
|
"cba_main",
|
||||||
|
"A3_Armor_F_Beta_APC_Wheeled_01"
|
||||||
};
|
};
|
||||||
class AddonsMetaData
|
class AddonsMetaData
|
||||||
{
|
{
|
||||||
class List
|
class List
|
||||||
{
|
{
|
||||||
items=8;
|
items=9;
|
||||||
class Item0
|
class Item0
|
||||||
{
|
{
|
||||||
className="A3_Ui_F";
|
className="A3_Ui_F";
|
||||||
@ -99,6 +100,13 @@ class AddonsMetaData
|
|||||||
author="CBA Team";
|
author="CBA Team";
|
||||||
url="https://www.github.com/CBATeam/CBA_A3";
|
url="https://www.github.com/CBATeam/CBA_A3";
|
||||||
};
|
};
|
||||||
|
class Item8
|
||||||
|
{
|
||||||
|
className="A3_Armor_F_Beta";
|
||||||
|
name="Arma 3 Beta - Armored Land Vehicles";
|
||||||
|
author="Bohemia Interactive";
|
||||||
|
url="http://www.arma3.com";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
randomSeed=14406749;
|
randomSeed=14406749;
|
||||||
@ -408,7 +416,7 @@ class Mission
|
|||||||
};
|
};
|
||||||
class Entities
|
class Entities
|
||||||
{
|
{
|
||||||
items=115;
|
items=119;
|
||||||
class Item0
|
class Item0
|
||||||
{
|
{
|
||||||
dataType="Marker";
|
dataType="Marker";
|
||||||
@ -567,7 +575,8 @@ class Mission
|
|||||||
dataType="Logic";
|
dataType="Logic";
|
||||||
class PositionInfo
|
class PositionInfo
|
||||||
{
|
{
|
||||||
position[]={14269.223,18.337202,16021.074};
|
position[]={14264.385,18.635801,16031.822};
|
||||||
|
angles[]={6.2711902,0,6.2605233};
|
||||||
};
|
};
|
||||||
name="chopperRespawn";
|
name="chopperRespawn";
|
||||||
id=9;
|
id=9;
|
||||||
@ -2392,16 +2401,286 @@ class Mission
|
|||||||
type="CBA_main_require";
|
type="CBA_main_require";
|
||||||
atlOffset=-8.7738037e-005;
|
atlOffset=-8.7738037e-005;
|
||||||
};
|
};
|
||||||
|
class Item115
|
||||||
|
{
|
||||||
|
dataType="Group";
|
||||||
|
side="West";
|
||||||
|
class Entities
|
||||||
|
{
|
||||||
|
items=4;
|
||||||
|
class Item0
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14268.474,18.13788,15888.054};
|
||||||
|
angles[]={0.014664836,2.7202222,6.2631893};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=4;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=136;
|
||||||
|
type="B_crew_F";
|
||||||
|
};
|
||||||
|
class Item1
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14268.474,18.13788,15888.054};
|
||||||
|
angles[]={0.014664836,2.7202222,6.2631893};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=6;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=137;
|
||||||
|
type="B_crew_F";
|
||||||
|
};
|
||||||
|
class Item2
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14268.474,18.13788,15888.054};
|
||||||
|
angles[]={0.014664836,2.7202222,6.2631893};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=4;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=138;
|
||||||
|
type="B_crew_F";
|
||||||
|
};
|
||||||
|
class Item3
|
||||||
|
{
|
||||||
|
dataType="Waypoint";
|
||||||
|
position[]={14267.931,17.781204,15868.208};
|
||||||
|
type="Guard";
|
||||||
|
class Effects
|
||||||
|
{
|
||||||
|
};
|
||||||
|
showWP="NEVER";
|
||||||
|
id=146;
|
||||||
|
atlOffset=8.5830688e-005;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
class CrewLinks
|
||||||
|
{
|
||||||
|
class LinkIDProvider
|
||||||
|
{
|
||||||
|
nextID=3;
|
||||||
|
};
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
items=3;
|
||||||
|
class Item0
|
||||||
|
{
|
||||||
|
linkID=0;
|
||||||
|
item0=136;
|
||||||
|
item1=135;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Item1
|
||||||
|
{
|
||||||
|
linkID=1;
|
||||||
|
item0=137;
|
||||||
|
item1=135;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=2;
|
||||||
|
turretPath[]={0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Item2
|
||||||
|
{
|
||||||
|
linkID=2;
|
||||||
|
item0=138;
|
||||||
|
item1=135;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=2;
|
||||||
|
turretPath[]={0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
id=134;
|
||||||
|
atlOffset=-0.0016822815;
|
||||||
|
};
|
||||||
|
class Item116
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14268.503,20.5984,15887.951};
|
||||||
|
angles[]={0.014664836,2.7202222,6.2631893};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=6;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=135;
|
||||||
|
type="B_APC_Wheeled_01_cannon_F";
|
||||||
|
atlOffset=-0.0016822815;
|
||||||
|
};
|
||||||
|
class Item117
|
||||||
|
{
|
||||||
|
dataType="Group";
|
||||||
|
side="West";
|
||||||
|
class Entities
|
||||||
|
{
|
||||||
|
items=4;
|
||||||
|
class Item0
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14344.261,17.931919,16131.581};
|
||||||
|
angles[]={6.2818484,6.0772042,6.2765174};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=4;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=141;
|
||||||
|
type="B_crew_F";
|
||||||
|
atlOffset=0.00018501282;
|
||||||
|
};
|
||||||
|
class Item1
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14344.261,17.931919,16131.581};
|
||||||
|
angles[]={6.2818484,6.0772042,6.2765174};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=6;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=142;
|
||||||
|
type="B_crew_F";
|
||||||
|
atlOffset=0.00018501282;
|
||||||
|
};
|
||||||
|
class Item2
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14344.261,17.931919,16131.581};
|
||||||
|
angles[]={6.2818484,6.0772042,6.2765174};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=4;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=143;
|
||||||
|
type="B_crew_F";
|
||||||
|
atlOffset=0.00018501282;
|
||||||
|
};
|
||||||
|
class Item3
|
||||||
|
{
|
||||||
|
dataType="Waypoint";
|
||||||
|
position[]={14358.525,17.717602,16107.497};
|
||||||
|
type="Guard";
|
||||||
|
class Effects
|
||||||
|
{
|
||||||
|
};
|
||||||
|
showWP="NEVER";
|
||||||
|
id=145;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
class CrewLinks
|
||||||
|
{
|
||||||
|
class LinkIDProvider
|
||||||
|
{
|
||||||
|
nextID=3;
|
||||||
|
};
|
||||||
|
class Links
|
||||||
|
{
|
||||||
|
items=3;
|
||||||
|
class Item0
|
||||||
|
{
|
||||||
|
linkID=0;
|
||||||
|
item0=141;
|
||||||
|
item1=140;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Item1
|
||||||
|
{
|
||||||
|
linkID=1;
|
||||||
|
item0=142;
|
||||||
|
item1=140;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=2;
|
||||||
|
turretPath[]={0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Item2
|
||||||
|
{
|
||||||
|
linkID=2;
|
||||||
|
item0=143;
|
||||||
|
item1=140;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
role=2;
|
||||||
|
turretPath[]={0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
id=139;
|
||||||
|
atlOffset=0.00018501282;
|
||||||
|
};
|
||||||
|
class Item118
|
||||||
|
{
|
||||||
|
dataType="Object";
|
||||||
|
class PositionInfo
|
||||||
|
{
|
||||||
|
position[]={14344.277,20.39312,16131.528};
|
||||||
|
angles[]={6.2818484,6.0772042,6.2765174};
|
||||||
|
};
|
||||||
|
side="West";
|
||||||
|
flags=6;
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
};
|
||||||
|
id=140;
|
||||||
|
type="B_APC_Wheeled_01_cannon_F";
|
||||||
|
atlOffset=0.00018501282;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
class Connections
|
class Connections
|
||||||
{
|
{
|
||||||
class LinkIDProvider
|
class LinkIDProvider
|
||||||
{
|
{
|
||||||
nextID=7;
|
nextID=9;
|
||||||
};
|
};
|
||||||
class Links
|
class Links
|
||||||
{
|
{
|
||||||
items=7;
|
items=9;
|
||||||
class Item0
|
class Item0
|
||||||
{
|
{
|
||||||
linkID=0;
|
linkID=0;
|
||||||
@ -2472,6 +2751,26 @@ class Mission
|
|||||||
type="Sync";
|
type="Sync";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
class Item7
|
||||||
|
{
|
||||||
|
linkID=7;
|
||||||
|
item0=135;
|
||||||
|
item1=9;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
type="Sync";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Item8
|
||||||
|
{
|
||||||
|
linkID=8;
|
||||||
|
item0=140;
|
||||||
|
item1=9;
|
||||||
|
class CustomData
|
||||||
|
{
|
||||||
|
type="Sync";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@ diag_log format["playerVehicleInList called, _this: %1", _this];
|
|||||||
private _triggerList = _this select 0;
|
private _triggerList = _this select 0;
|
||||||
private _returnValue = false;
|
private _returnValue = false;
|
||||||
|
|
||||||
|
private _justPlayers = (call BIS_fnc_listPlayers) - entities "HeadlessClient_F";
|
||||||
scopeName "main";
|
scopeName "main";
|
||||||
{
|
{
|
||||||
private _plr = _x;
|
private _plr = _x;
|
||||||
@ -11,7 +12,7 @@ scopeName "main";
|
|||||||
_returnValue = _veh;
|
_returnValue = _veh;
|
||||||
breakTo "main";
|
breakTo "main";
|
||||||
}
|
}
|
||||||
} forEach (call BIS_fnc_listPlayers);
|
} forEach _justPlayers;
|
||||||
|
|
||||||
diag_log format["playerVehicleInList returning: %1", _returnValue];
|
diag_log format["playerVehicleInList returning: %1 (driver: %2)", _returnValue, driver _returnValue];
|
||||||
_returnValue
|
_returnValue
|
@ -15,3 +15,5 @@ getSideTasks = compile preProcessfile "getSideTasks.sqf";
|
|||||||
getSideActiveTasks = compile preProcessfile "getSideActiveTasks.sqf";
|
getSideActiveTasks = compile preProcessfile "getSideActiveTasks.sqf";
|
||||||
|
|
||||||
taskSpawner = compile preProcessfile "taskSpawner.sqf";
|
taskSpawner = compile preProcessfile "taskSpawner.sqf";
|
||||||
|
xenoRepair = compile preProcessfile "xenoRepair.sqf";
|
||||||
|
vehicleInit = compile preProcessfile "vehicleInit.sqf";
|
||||||
|
@ -36,9 +36,3 @@ while {_x < LZCOUNT} do
|
|||||||
lzList = lzList + [_lz];
|
lzList = lzList + [_lz];
|
||||||
_x = _x + 1;
|
_x = _x + 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
publicVariable "lzList";
|
|
||||||
|
|
||||||
// Keep track of how many LZ we have created, used to give tasks unique names and priorities
|
|
||||||
lzCounter = 0;
|
|
||||||
publicVariable "lzCounter";
|
|
||||||
|
@ -2,3 +2,8 @@ diag_log format["vehicleIinit called, _this: %1", _this];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
_pilot = _this select 1;
|
_pilot = _this select 1;
|
||||||
|
diag_log format["vehicleIinit called, _this: %1", _this];
|
||||||
|
|
||||||
|
[_vehicle, ["Repair", "xenoRepair.sqf"]] remoteExec ["addAction", 0, netId _vehicle];
|
||||||
|
|
||||||
|
_pilot addRating 9999;
|
107
helotraining_rewrite.Altis/xenoRepair.sqf
Normal file
107
helotraining_rewrite.Altis/xenoRepair.sqf
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
// by Xeno
|
||||||
|
private ["_config","_count","_i","_magazines","_object","_type","_type_name"];
|
||||||
|
|
||||||
|
_object = _this select 0;
|
||||||
|
|
||||||
|
_type = typeof _object;
|
||||||
|
|
||||||
|
if (_object isKindOf "ParachuteBase") exitWith {};
|
||||||
|
|
||||||
|
if (isNil "x_reload_time_factor") then {x_reload_time_factor = 1;};
|
||||||
|
|
||||||
|
//if (!local _object) exitWith {};
|
||||||
|
|
||||||
|
if (!alive _object) exitWith {};
|
||||||
|
_object setFuel 0;
|
||||||
|
_object setVehicleAmmo 1; // Reload turrets / drivers magazine
|
||||||
|
|
||||||
|
_type_name = typeOf _object;
|
||||||
|
|
||||||
|
_object vehicleChat format ["Servicing %1... Please stand by...", _type];
|
||||||
|
|
||||||
|
_magazines = getArray(configFile >> "CfgVehicles" >> _type >> "magazines");
|
||||||
|
|
||||||
|
if (count _magazines > 0) then {
|
||||||
|
_removed = [];
|
||||||
|
{
|
||||||
|
if (!(_x in _removed)) then {
|
||||||
|
_object removeMagazines _x;
|
||||||
|
_removed set [count _removed, _x];
|
||||||
|
};
|
||||||
|
} forEach _magazines;
|
||||||
|
{
|
||||||
|
_object vehicleChat format ["Reloading %1", _x];
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) exitWith {};
|
||||||
|
_object addMagazine _x;
|
||||||
|
} forEach _magazines;
|
||||||
|
};
|
||||||
|
|
||||||
|
_count = count (configFile >> "CfgVehicles" >> _type >> "Turrets");
|
||||||
|
|
||||||
|
if (_count > 0) then {
|
||||||
|
for "_i" from 0 to (_count - 1) do {
|
||||||
|
scopeName "xx_reload2_xx";
|
||||||
|
_config = (configFile >> "CfgVehicles" >> _type >> "Turrets") select _i;
|
||||||
|
_magazines = getArray(_config >> "magazines");
|
||||||
|
_removed = [];
|
||||||
|
{
|
||||||
|
if (!(_x in _removed)) then {
|
||||||
|
_object removeMagazines _x;
|
||||||
|
_removed set [count _removed, _x];
|
||||||
|
};
|
||||||
|
} forEach _magazines;
|
||||||
|
{
|
||||||
|
_object vehicleChat format ["Reloading %1", _x];
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) then {breakOut "xx_reload2_xx"};
|
||||||
|
_object addMagazine _x;
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) then {breakOut "xx_reload2_xx"};
|
||||||
|
} forEach _magazines;
|
||||||
|
// check if the main turret has other turrets
|
||||||
|
_count_other = count (_config >> "Turrets");
|
||||||
|
// this code doesn't work, it's not possible to load turrets that are part of another turret ??
|
||||||
|
// nevertheless, I leave it here
|
||||||
|
if (_count_other > 0) then {
|
||||||
|
for "_i" from 0 to (_count_other - 1) do {
|
||||||
|
_config2 = (_config >> "Turrets") select _i;
|
||||||
|
_magazines = getArray(_config2 >> "magazines");
|
||||||
|
_removed = [];
|
||||||
|
{
|
||||||
|
if (!(_x in _removed)) then {
|
||||||
|
_object removeMagazines _x;
|
||||||
|
_removed set [count _removed, _x];
|
||||||
|
};
|
||||||
|
} forEach _magazines;
|
||||||
|
{
|
||||||
|
_object vehicleChat format ["Reloading %1", _x];
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) then {breakOut "xx_reload2_xx"};
|
||||||
|
_object addMagazine _x;
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) then {breakOut "xx_reload2_xx"};
|
||||||
|
} forEach _magazines;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_object setVehicleAmmo 1; // Reload turrets / drivers magazine
|
||||||
|
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) exitWith {};
|
||||||
|
_object vehicleChat "Repairing...";
|
||||||
|
_object setDamage 0;
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) exitWith {};
|
||||||
|
_object vehicleChat "Refueling...";
|
||||||
|
while {fuel _object < 0.99} do {
|
||||||
|
//_object setFuel ((fuel _vehicle + 0.1) min 1);
|
||||||
|
_object setFuel 1;
|
||||||
|
sleep 0.01;
|
||||||
|
};
|
||||||
|
sleep x_reload_time_factor;
|
||||||
|
if (!alive _object) exitWith {};
|
||||||
|
_object vehicleChat format ["%1 is ready...", _type_name];
|
||||||
|
|
||||||
|
if (true) exitWith {};
|
Loading…
Reference in New Issue
Block a user