Search the Community
Showing results for tags 'hunters'.
Found 1 result
-
script Hunters chasing player, problem with vehicles
TURCO_AR posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Greetings to all. I usually use this script to spawn (on trigger position) hunters to hunt the players (on foot) in my multiplayer mission (dedi) and its works perfect. But updating the mission and adding vehicles for the players I realized that when a player is inside a vehicle and activates the trigger and then gets off the vehicle and continues on foot, the hunters reach the position of the abandoned vehicle and stop there, do not continue chasing the player on foot. Any help or advice is welcome. Thank You! Trigger size: 390 x 390 Activation: Any Player ActType: Present Server Only: yes Cond: this OnAct: null = [thistrigger,thislist] execvm "4hunters.sqf"; 4hunters.sqf _PosTrigger = _this select 0; _objetives = _this select 1; _objetive = _objetives select 0; if (isserver) then { private ["_hunters", "_leaderhunters"]; _CountEnemies = {alive _x && side _x == independent} count allUnits; //Spawn hunters if less than 100 enemies on the map if (_CountEnemies < 100) then { _SpawnPos = position _PosTrigger ; _hunters = createGroup independent; _hunters = [_SpawnPos, independent, ["I_C_Soldier_Para_2_F","I_C_Soldier_Para_1_F","I_C_Soldier_Para_2_F","I_C_Soldier_Para_1_F"],[],[],[],[],[],260] call BIS_fnc_SpawnGroup; //Move to player position _leaderhunters = leader _hunters; _leaderhunters move (position _objetive); _hunters setCombatMode "RED"; _hunters setBehaviour "AWARE"; _hunters allowFleeing 0; 0 = [_hunters,_objetive] spawn { while {true} do { params ["_hunters","_objetive"]; sleep 3; //If the player who activates the trigger moves more than 400 meters away, the hunters are deleted if ((_objetive distance (leader _hunters)) > 400) exitWith { {deleteVehicle _x} forEach units _hunters; }; }; }; //When the hunters reach the position where the trigger is activated (and the player is not there) wait 3 sec and update the player's new position. while {true} do { // _leaderhunters = leader _hunters; if ((unitReady _leaderhunters) && {(alive _leaderhunters)}) then { sleep 3; if (({ alive _x} count (units _hunters)) != 0) then { _leaderhunters = leader _hunters; _leaderhunters move (position _objetive); _hunters setCombatMode "RED"; _hunters setBehaviour "AWARE"; _hunters allowFleeing 0;};};}; }; };- 5 replies
-
- hunters
- multiplayer
-
(and 1 more)
Tagged with: