summaryrefslogtreecommitdiffstats
path: root/Server/AI/AI_UpdateSupplyTruck.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:04 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:04 +0300
commitb06990293397d4b6d0374097f09d1cc5679216e3 (patch)
tree5719922562e317a8083250c178f24376b6692569 /Server/AI/AI_UpdateSupplyTruck.sqf
downloada2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz
a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2
a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip
init
Diffstat (limited to 'Server/AI/AI_UpdateSupplyTruck.sqf')
-rw-r--r--Server/AI/AI_UpdateSupplyTruck.sqf24
1 files changed, 24 insertions, 0 deletions
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";
+ };
+ };
+};