mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
improvements
This commit is contained in:
parent
fb9068625e
commit
5e2e21a417
@ -44,30 +44,32 @@ private _assignTo = [_assignToPlayer, west];
|
||||
|
||||
// PONDER: make a parent task "ferry squad X" ??
|
||||
private _taskid = format["dropoff_%1", lzCounter];
|
||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],_lzLocation,"AUTOASSIGNED",1,true, _taskType, true] call BIS_fnc_taskCreate;
|
||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],_lzLocation,"AUTOASSIGNED",1,true, "move", true] call BIS_fnc_taskCreate;
|
||||
|
||||
private _handleDropoff=false;
|
||||
private _trg = createTrigger["EmptyDetector",getPos _lzLocation, true];
|
||||
_trg setTriggerArea[lzSize,lzSize,0,false];
|
||||
_trg setTriggerActivation["WEST","PRESENT",false];
|
||||
_trg setTriggerTimeout [2.5, 2.5, 2.5, true];
|
||||
_trg setTriggerStatements[ format["((%1 in thisList) && (isTouchingGround %1))", _bindToVehicle], "_handleDropoff = true;", ""];
|
||||
_trg setTriggerStatements[ format["((%1 in thisList) && (isTouchingGround %1))", _bindToVehicle], "", ""];
|
||||
|
||||
// TODO: implement deadline so the task doesn't linger forever
|
||||
scopeName "main";
|
||||
while {true} do
|
||||
{
|
||||
scopeName "mainloop";
|
||||
diag_log "createDropoffLZ: ticking";
|
||||
|
||||
if ({alive _x} count units _squad == 0) then
|
||||
{
|
||||
diag_log format["createDropoffLZ: Everyone from %1 is dead!", _squad];
|
||||
// Everybody died before getting there :(
|
||||
[_taskid, "FAILED" ,true] spawn BIS_fnc_taskSetState;
|
||||
breakOut "mainloop";
|
||||
};
|
||||
|
||||
if (_handleDropoff) then
|
||||
if (triggerActivated _trg) then
|
||||
{
|
||||
diag_log format["createDropoffLZ: triggered, unloading %1", _squad];
|
||||
private _veh = [list _trg] call playerVehicleInList;
|
||||
private _handle = [_lzLocation, _veh, _squad, _taskid] spawn ejectSquad;
|
||||
waitUntil {isNull _handle};
|
||||
|
@ -26,4 +26,6 @@ if (_includeAA) then
|
||||
"O_soldier_AA_F" createUnit [_enemyPosition, _groupEnemy,"",0.75, "CORPORAL"];
|
||||
};
|
||||
|
||||
diag_log format["createEnemySquad %1 positioned to %2", _groupEnemy, _enemyPosition];
|
||||
|
||||
[_groupEnemy]
|
@ -45,14 +45,15 @@ if (!(_assignExtra isEqualTo false)) then
|
||||
|
||||
// PONDER: make a parent task "ferry squad X" ??
|
||||
private _taskid = format["pickup_%1", lzCounter];
|
||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],_lzLocation,"AUTOASSIGNED",1,true, "meet", true] call BIS_fnc_taskCreate;
|
||||
[_assignTo,[_taskid],[_longdesc, _shortdesc, _shortestDesc],_lzLocation,"AUTOASSIGNED",1,true, "move", true] call BIS_fnc_taskCreate;
|
||||
[_squad, _lzLocation, 'green'] spawn spawnSmokeBySquad;
|
||||
|
||||
|
||||
private _handlePickup=false;
|
||||
private _trg = createTrigger["EmptyDetector",getPos _lzLocation, true];
|
||||
_trg setTriggerArea[lzSize,lzSize,0,false];
|
||||
_trg setTriggerActivation["WEST","PRESENT",false];
|
||||
_trg setTriggerTimeout [2.5, 2.5, 2.5, true];
|
||||
_trg setTriggerStatements["([thisList] call playerVehicleInListBool)", "_handlePickup = true;", ""];
|
||||
_trg setTriggerStatements["([thisList] call playerVehicleInListBool)", "", ""];
|
||||
|
||||
|
||||
// TODO: implement deadline so the task doesn't linger forever
|
||||
@ -60,16 +61,19 @@ scopeName "main";
|
||||
while {true} do
|
||||
{
|
||||
scopeName "mainloop";
|
||||
diag_log "createPickupLZ: ticking";
|
||||
|
||||
if ({alive _x} count units _squad == 0) then
|
||||
{
|
||||
diag_log format["createPickupLZ: Everyone from %1 is dead!", _squad];
|
||||
// Everybody died before we got there :(
|
||||
[_taskid, "FAILED" ,true] spawn BIS_fnc_taskSetState;
|
||||
breakOut "mainloop";
|
||||
};
|
||||
|
||||
if (_handlePickup) then
|
||||
if (triggerActivated _trg) then
|
||||
{
|
||||
diag_log format["createPickupLZ: triggedred, loading up %1", _squad];
|
||||
private _newLZLocation = (lzList - [_lzLocation]) call BIS_fnc_SelectRandom;
|
||||
private _veh = [list _trg] call playerVehicleInList;
|
||||
private _handle = [_veh, _squad, _taskid] spawn loadSquad;
|
||||
@ -79,7 +83,7 @@ while {true} do
|
||||
waitUntil {isNull _handle};
|
||||
breakOut "mainloop";
|
||||
};
|
||||
sleep 1;
|
||||
sleep 2;
|
||||
};
|
||||
|
||||
deleteVehicle _trg;
|
||||
|
@ -9,6 +9,7 @@ createSquad = compile preProcessfile "createSquad.sqf";
|
||||
createEnemySquads = compile preProcessfile "createEnemySquads.sqf";
|
||||
loadSquad = compile preProcessfile "loadSquad.sqf";
|
||||
ejectSquad = compile preProcessfile "ejectSquad.sqf";
|
||||
spawnSmokeBySquad = compile preProcessfile "spawnSmokeBySquad.sqf";
|
||||
|
||||
deleteSquads = compile preProcessfile "deleteSquads.sqf";
|
||||
playerVehicleInList = compile preProcessfile "playerVehicleInList.sqf";
|
||||
|
@ -16,10 +16,10 @@ class EditorData
|
||||
};
|
||||
class Camera
|
||||
{
|
||||
pos[]={14282.739,122.37674,15861.688};
|
||||
dir[]={0.084973976,-0.58932984,0.80349606};
|
||||
up[]={0.061992381,0.80780429,0.58616567};
|
||||
aside[]={0.99452043,2.505476e-007,-0.10517917};
|
||||
pos[]={14253.876,161.88496,15821.944};
|
||||
dir[]={0.081877343,-0.63147533,0.7711519};
|
||||
up[]={0.066685185,0.77530128,0.62804556};
|
||||
aside[]={0.99447972,4.1961903e-007,-0.10559266};
|
||||
};
|
||||
};
|
||||
binarizationWanted=0;
|
||||
|
34
helotraining_rewrite.Altis/spawnSmokeBySquad.sqf
Normal file
34
helotraining_rewrite.Altis/spawnSmokeBySquad.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
diag_log format["spawnSmokeBySquad called, _this: %1", _this];
|
||||
private _bindToSquad = _this select 0;
|
||||
private _smokeLozation = _this select 1;
|
||||
private _smokeColor = _this select 2;
|
||||
|
||||
private _trg = createTrigger["EmptyDetector",getPos _smokeLozation, true];
|
||||
_trg setTriggerArea[50,50,0,false];
|
||||
_trg setTriggerActivation["WEST","PRESENT",false];
|
||||
private _trgCond = format["count (%1 arrayIntersect thisList) > 0", units _squad];
|
||||
diag_log format["spawnSmokeBySquad _trgCond: %1", _trgCond];
|
||||
_trg setTriggerStatements[_trgCond, "", ""];
|
||||
|
||||
// TODO: switch color based on arguments
|
||||
while {triggerActivated _trg} do
|
||||
{
|
||||
_hour = daytime;
|
||||
if (_hour > 5 && _hour < 19) then
|
||||
{
|
||||
_smoke= "SmokeShellGreen" createVehicle _smokeLozation;
|
||||
sleep 40;
|
||||
deleteVehicle _smoke;
|
||||
}
|
||||
else
|
||||
{
|
||||
_chemlight= "Chemlight_green" createVehicle _smokeLozation;
|
||||
_smoke= "SmokeShellGreen" createVehicle _smokeLozation;
|
||||
sleep 40;
|
||||
deleteVehicle _chemlight;
|
||||
deleteVehicle _smoke;
|
||||
};
|
||||
diag_log format["spawnSmokeBySquad: spawned smoke to %1", _smokeLoc];
|
||||
};
|
||||
diag_log format["spawnSmokeBySquad done, _this: %1", _this];
|
||||
deleteVehicle _trg;
|
Loading…
Reference in New Issue
Block a user