Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Todo;
- //- #help system mit https://github.com/CBATeam/CBA_A3/wiki/Registering-Custom-Chat-Commands
- // - if Zeugs zum Laufen bringen
- //Debug Marker for Vehicle
- Debug = true;
- hint "Mission in being Initialized";
- private "_marker";
- _marker = [
- "marker_51"
- //,"marker_52"
- //,"marker_53"
- //,"marker_54"
- //,"marker_55"
- ] call Bis_fnc_selectRandom;
- [blufor,["task"],["Stop the Vehicle and Capture/Eliminate all Criminals","Vehicle fleeing in this Area",""],_marker,"ASSIGNED",2,true,"",false] call BIS_fnc_taskCreate;
- //_spot = (_marker) nearRoads 100;
- private "_spot";
- _spot = [[[_marker, 200]],["water"]] call BIS_fnc_randomPos;
- private "_vehicleType";
- _vehicleType = ["C_Offroad_01_F","C_Hatchback_01_F","C_Offroad_02_unarmed_F","C_SUV_01_F"] call BIS_fnc_selectRandom;
- veh = _vehicleType createVehicle _spot;
- [veh, true, true, true] call bis_fnc_initVehicle;
- enemys = createGroup [east, true];
- private "_unit";
- _unit = enemys createUnit ["O_G_officer_F",getPos veh,[],4,"NONE"];
- _unit moveInAny veh;
- private "_unit2";
- _unit2 = enemys createUnit ["O_G_officer_F",getPos veh,[],4,"NONE"];
- _unit2 moveInAny veh;
- private "_unit3";
- _unit3 = enemys createUnit ["O_G_officer_F",getPos veh,[],4,"NONE"];
- _unit3 moveInAny veh;
- private "_unit4";
- _unit4 = enemys createUnit ["O_G_officer_F",getPos veh,[],4,"NONE"];
- _unit4 moveInAny veh;
- [_unit,_unit2,_unit3,_unit4] join enemys;
- enemys allowFleeing 0.8;
- enemys setBehaviour "SAFE";
- [enemys,_marker,2000] call bis_fnc_taskPatrol;
- [300,true] call BIS_fnc_countDown;
- countdown = missionNamespace getVariable "bis_fnc_countdown_time";
- hint "Mission Initialized";
- sleep 2;
- private "_taskactive";
- _taskActive = true;
- while {_taskActive} do
- {
- if (debug) then
- {
- createMarker ["carmarker", getpos veh];
- "carmarker" setMarkerColor "ColorRed";
- "carmarker" setMarkerType "mil_objective";
- while {true} do
- {
- "carmarker" setmarkerpos (getpos veh);
- sleep 0.5;
- };
- if (noenemy) then
- {
- deleteMarker "carmarker"
- };
- };
- if (!noenemy) then
- {
- //Erfolgreich
- ["task", "SUCCEEDED", true] call BIS_fnc_taskSetState;
- _taskActive = false;
- ["itemRemove", ["hintloop"]] call BIS_fnc_loop;
- };
- if (countdown == 0) then
- {
- //Fehlgeschlagen
- ["task", "FAILED", true] call BIS_fnc_taskSetState;
- _taskActive = false;
- ["itemRemove", ["hintloop"]] call BIS_fnc_loop;
- };
- //Aufgeben - noch mit Zufallssystem erweitern
- if (({alive _x} count units enemys) < 3) then
- {
- systemChat "Surrender wird ausgeführt";
- {
- _x setCaptive true;
- player action ["Surrender", _x];
- if (alive _x) then
- {
- _x addAction ["Arrest",
- {
- [_this select 0, "GUARD", "ASIS"] call BIS_fnc_ambientAnim;
- }];
- };
- } forEach units enemys;
- };
- //Aus Fahrzeug ziehen
- if (speed (veh) == 0) then
- {
- systemChat "GetOut wird ausgeführt";
- private "_unitDriver";
- _unitDriver = driver veh;
- vehicle _unitDriver addAction ["Pull out",
- {
- player action ["getOut", vehicle _unitDriver];
- sleep 0.1;
- player action ["Surrender", _this select 0];
- _unitDriver addAction ["Arrest",
- {
- [_this select 0, "GUARD", "ASIS"] call BIS_fnc_ambientAnim;
- }];
- }];
- };
- ["itemAdd", ["hintloop", {hintSilent format ["Time: %1",countdown ];}, 0.5]] call BIS_fnc_loop;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement