From e670b4ed55c459a21090bd0178ceaaaf12d87989 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:58:31 +0300 Subject: init --- Server/AI/AI_UpdateSupplyTruck.sqf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Server/AI/AI_UpdateSupplyTruck.sqf (limited to 'Server/AI/AI_UpdateSupplyTruck.sqf') diff --git a/Server/AI/AI_UpdateSupplyTruck.sqf b/Server/AI/AI_UpdateSupplyTruck.sqf new file mode 100644 index 0000000..9083ed7 --- /dev/null +++ b/Server/AI/AI_UpdateSupplyTruck.sqf @@ -0,0 +1,24 @@ +Private ["_AITrucks","_destinations","_driver","_full","_hq","_isDeployed","_maist","_side","_sideText","_team","_type","_vehicle"]; +_side = _this select 0; +_sideText = str _side; +_maist = 'WFBE_MAXAISUPPLYTRUCKS' Call GetNamespace; + +sleep ((Random 200) / 100); +sleep ((Random 200) / 100); + +waitUntil {townInit}; + +while {!gameOver} do { + sleep 60; + _AITrucks = Format ["WFBE_%1_AISupplyTrucks",_sideText] Call GetNamespace; + _full = false; + if (count _AITrucks >= _maist) then {_full = true}; + if (!_full) then { + _isDeployed = (_sideText) Call GetSideHQDeployed; + _hq = (_sideText) Call GetSideHQ; + if ((_isDeployed)&&(alive _hq)&&(!isNull _hq)) then { + diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] AI_UpdateSupplyTruck: A %1 Supply truck has been created",_side,diag_frameno,diag_tickTime]; + [_side] ExecFSM "Server\FSM\supplytruck.fsm"; + }; + }; +}; -- cgit v1.3.1