Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. // missionRogue.sqf
  2. // 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
  3.  
  4. params ["_switchType", "_objTarget", "_message"];
  5. private ["_deployPos", "_secondObj","_posX", "_posY","_totalPlayers","_totalCivs","_civSecured","_randomX","_randomY"];
  6.  
  7. _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];
  8. GlobalHint = _misMidHintText; publicVariable "GlobalHint"; hint parseText GlobalHint;
  9.  
  10. _totalPlayers = count (allPlayers - entities "HeadlessClient_F");
  11.  
  12. switch (_switchType) do{
  13. case "intel": {
  14. // spawn civilians in a group and spread them around the objective location
  15. rogueCivGrp = createGroup civilian;
  16. private _emptyPosition = [];
  17. _emptyPosition = _objTarget findEmptyPosition [50, 200];
  18. (selectRandom civTypes) createUnit [_emptyPosition,rogueCivGrp,"removeAllWeapons this; removeAllItems this;
  19. removeAllAssignedItems this; removeVest this; removeBackpack this; this setidentity 'John Smith';"];
  20. rogueCiv = ((units rogueCivGrp) select 0);
  21. [rogueCiv] call addToZeus;
  22. if (_totalPlayers > 10) then{
  23. _totalCivs = 20;
  24. }else{
  25. _totalCivs = 10;
  26. };
  27. for "_i" from 0 to _totalCivs do{
  28. _emptyPosition = _objTarget findEmptyPosition [50, 200];
  29. (selectRandom civTypes) createUnit [_emptyPosition,rogueCivGrp,"removeAllWeapons this; removeAllItems this;
  30. removeAllAssignedItems this; removeVest this; removeBackpack this;"];
  31. };
  32. //Blow up the objective, they didn't secure the civ!
  33. rogueTrigger1 = createTrigger ["EmptyDetector", _objTarget];
  34. rogueTrigger1 setTriggerArea [2,2,0,false];
  35. rogueTrigger1 setTriggerActivation ["WEST","PRESENT",false];
  36. rogueTrigger1 setTriggerStatements ["this","
  37. if (!captive rogueCiv) then{
  38. _claymore = 'SatchelCharge_Remote_Mag' createVehicle _objTarget;
  39. 0 = _claymore spawn {
  40. sleep 0.1;
  41. _this setDamage 1;
  42. };
  43. rogueObjective setDamage 1;
  44. ['fail','The Intel was destroyed!'] execVM 'scripts\core\missionNext.sqf';};",""];
  45. missionTriggers pushBack rogueTrigger1;
  46. _civSecured = 0;
  47. /*
  48. while {_civSecured==0} do{
  49. if (captive rogueCiv) then{
  50. missionTriggers = -[rogueTrigger1];
  51.  
  52. _civSecured=1;
  53. };
  54. };
  55. */
  56. };
  57. case "blowup": {
  58.  
  59. };
  60. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement