Advertisement
Guest User

missionTasks.sqf

a guest
Apr 5th, 2013
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. /*
  2. * Filename:
  3. * missionTasks.sqf
  4. *
  5. * Description:
  6. * Automatically called
  7. *
  8. * Created by [KH]Jman
  9. * Creation date: 02/03/2013
  10. * Email: jman@kellys-heroes.eu
  11. * Web: http://www.kellys-heroes.eu
  12. *
  13. * */
  14.  
  15. // ====================================================================================
  16.  
  17. case "objective_1": {
  18. debuglog str _taskState;
  19. if (_taskState == "") then {
  20. [
  21. [units group player, // Task owner(s)
  22. _taskID, // task ID (used when setting task state, destination or description later)
  23. ["Clear the beach camp of enemy and secure.","Secure beach camp",""], // Task params
  24. position objective_target_1, // task destination
  25. true // true to set task as current upon creation
  26. ],
  27. "BIS_fnc_taskCreate", // task function
  28. nil, // execution only on specific client; undefined here, will be by default executed for everyone
  29. true // true for persistent execution (i.e., also for players connected by JIP)
  30. ] call BIS_fnc_MP;
  31.  
  32. } else {
  33. debuglog str _this;
  34. if (_this == "Current") then {_taskID call BIS_fnc_taskSetCurrent} else {[_taskID, _this] call BIS_fnc_taskSetState}
  35. }
  36. };
  37.  
  38.  
  39.  
  40.  
  41. case "objective_2": {
  42. if (_taskState == "") then {
  43. [
  44. [
  45. units group player,
  46. _taskID,
  47. ["Destroy the communications tower with explosives","Destroy comms tower",""],
  48. position objective_target_2,
  49. false
  50. ],
  51. "BIS_fnc_taskCreate",
  52. nil,
  53. true
  54. ] call BIS_fnc_MP;
  55.  
  56. } else {
  57. if (_this == "Current") then {_taskID call BIS_fnc_taskSetCurrent} else {[_taskID, _this] call BIS_fnc_taskSetState}
  58. }
  59. };
  60.  
  61.  
  62.  
  63.  
  64. case "objective_3": {
  65. if (_taskState == "") then {
  66. [
  67. [
  68. units group player,
  69. _taskID,
  70. ["Search the area for intel backpack","Search area",""],
  71. position objective_target_3,
  72. false
  73. ],
  74. "BIS_fnc_taskCreate",
  75. nil,
  76. true
  77. ] call BIS_fnc_MP;
  78.  
  79. } else {
  80. if (_this == "Current") then {_taskID call BIS_fnc_taskSetCurrent} else {[_taskID, _this] call BIS_fnc_taskSetState}
  81. }
  82. };
  83.  
  84.  
  85.  
  86. case "objective_4": {
  87. if (_taskState == "") then {
  88. [
  89. [
  90. units group player,
  91. _taskID,
  92. ["Steal the enemy helicopter's flight recorder","Steal FR",""],
  93. position objective_target_4,
  94. false
  95. ],
  96. "BIS_fnc_taskCreate",
  97. nil,
  98. true
  99. ] call BIS_fnc_MP;
  100.  
  101. } else {
  102. if (_this == "Current") then {_taskID call BIS_fnc_taskSetCurrent} else {[_taskID, _this] call BIS_fnc_taskSetState}
  103. }
  104. };
  105.  
  106.  
  107.  
  108. case "objective_5": {
  109. if (_taskState == "") then {
  110. [
  111. [
  112. units group player,
  113. _taskID,
  114. ["Clear enemy forward operating base","Clear FOB",""],
  115. position objective_target_5,
  116. false
  117. ],
  118. "BIS_fnc_taskCreate",
  119. nil,
  120. true
  121. ] call BIS_fnc_MP;
  122.  
  123. } else {
  124. if (_this == "Current") then {_taskID call BIS_fnc_taskSetCurrent} else {[_taskID, _this] call BIS_fnc_taskSetState}
  125. }
  126. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement