Advertisement
Guest User

Untitled

a guest
Dec 12th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1.  
  2. onSideMissionDefenderCreate =
  3. {
  4. [east,[]]
  5. };
  6.  
  7. smEnemyBaseFound =
  8. {
  9. {
  10. _x params SIDEMIS_PARAMS;
  11.  
  12. // Todo was this enemy base?
  13.  
  14. // if(_misSide != baseside) then
  15.  
  16. // systemchat format ["hmmm %1 %2",_misConf, (missionconfigfile >> "SideMissions" >> "ScoutArea") ];
  17.  
  18. if((_misConf) == (missionconfigfile >> "SideMissions" >> "ScoutArea")) then
  19. {
  20. _fn = getText (_misConf >> "smOnScoutComplete");
  21. if(_fn != "") then
  22. {
  23. call compile _fn;
  24. };
  25.  
  26. };
  27.  
  28. } foreach runningSideMissions;
  29. };
  30.  
  31. // modify this function for reward on completing mission
  32. onSideMissionComplete =
  33. {
  34. params ["_misConf","_reward","_completers","_helpers"];
  35.  
  36.  
  37. {
  38.  
  39. // give money/XP to _x (player)
  40. [500,0] call HG_fnc_addOrSubXP;
  41. [500, 0] call HG_fnc_addOrSubCash;
  42. } foreach _completers;
  43. 
  44.  
  45. player globalchat format ["--> %1 - %2 - %3 - %4",configname _misConf, _completers, _helpers, floor time ];
  46.  
  47. };
  48.  
  49. onSideMissionEnded =
  50. {
  51. params ["_side"];
  52.  
  53. _misRunning = _side call smGetRunningMissionsForSide;
  54. };
  55.  
  56.  
  57. // Modify this function for the destination of the captives
  58. isBaseNear =
  59. {
  60. params ["_side","_pos"];
  61.  
  62. _pos distance2D heli < 5
  63. };
  64.  
  65.  
  66. [] spawn
  67. {
  68. while { true } do
  69. {
  70.  
  71. if([playerside,getpos player] call isBaseNear) then
  72. {
  73. hint "base found";
  74. call smEnemyBaseFound;
  75. };
  76.  
  77. sleep 1;
  78. };
  79. };
  80.  
  81.  
  82.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement