Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // missionRogue.sqf
- // triggers a rogue CIV/team that will counter attack the objective e.g. when BLUFOR aproach's the getCodes mission without apreending the CIV, he will blow up the objective and mission will fail
- params ["_switchType", "_objTarget", "_message"];
- private ["_deployPos", "_secondObj","_posX", "_posY","_totalPlayers","_totalCivs","_civSecured","_randomX","_randomY"];
- _misMidHintText = format ["<t align='center' size='2.2'>Attention!</t><br/><t size='1.5' align='center' color='#FFCF11'></t><br/>____________________<br/>%1<br/><br/>", _message];
- GlobalHint = _misMidHintText; publicVariable "GlobalHint"; hint parseText GlobalHint;
- _totalPlayers = count (allPlayers - entities "HeadlessClient_F");
- switch (_switchType) do{
- case "intel": {
- // spawn civilians in a group and spread them around the objective location
- rogueCivGrp = createGroup civilian;
- private _emptyPosition = [];
- _emptyPosition = _objTarget findEmptyPosition [50, 200];
- (selectRandom civTypes) createUnit [_emptyPosition,rogueCivGrp,"removeAllWeapons this; removeAllItems this;
- removeAllAssignedItems this; removeVest this; removeBackpack this; this setidentity 'John Smith';"];
- rogueCiv = ((units rogueCivGrp) select 0);
- [rogueCiv] call addToZeus;
- if (_totalPlayers > 10) then{
- _totalCivs = 20;
- }else{
- _totalCivs = 10;
- };
- for "_i" from 0 to _totalCivs do{
- _emptyPosition = _objTarget findEmptyPosition [50, 200];
- (selectRandom civTypes) createUnit [_emptyPosition,rogueCivGrp,"removeAllWeapons this; removeAllItems this;
- removeAllAssignedItems this; removeVest this; removeBackpack this;"];
- };
- //Blow up the objective, they didn't secure the civ!
- rogueTrigger1 = createTrigger ["EmptyDetector", _objTarget];
- rogueTrigger1 setTriggerArea [2,2,0,false];
- rogueTrigger1 setTriggerActivation ["WEST","PRESENT",false];
- rogueTrigger1 setTriggerStatements ["this","
- if (!captive rogueCiv) then{
- _claymore = 'SatchelCharge_Remote_Mag' createVehicle _objTarget;
- 0 = _claymore spawn {
- sleep 0.1;
- _this setDamage 1;
- };
- rogueObjective setDamage 1;
- ['fail','The Intel was destroyed!'] execVM 'scripts\core\missionNext.sqf';};",""];
- missionTriggers pushBack rogueTrigger1;
- _civSecured = 0;
- /*
- while {_civSecured==0} do{
- if (captive rogueCiv) then{
- missionTriggers = -[rogueTrigger1];
- _civSecured=1;
- };
- };
- */
- };
- case "blowup": {
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement