feat: Add helicopter capture objective#197
Open
fishgills wants to merge 3 commits intoCaptainPStar:masterfrom
Open
feat: Add helicopter capture objective#197fishgills wants to merge 3 commits intoCaptainPStar:masterfrom
fishgills wants to merge 3 commits intoCaptainPStar:masterfrom
Conversation
Adds a new dynamic objective to capture a helicopter. This new objective spawns a helicopter with enough seats for the current number of players. The helicopter is guarded by a small group of enemy soldiers. A new task is created for the players, guiding them to the helicopter's location. The task is completed when the players get close to the helicopter and unlock it. This objective will only spawn on the Altis and Livonia maps.
Adds a new dynamic objective to capture a helicopter. This new objective spawns a helicopter with enough seats for the current number of players. The helicopter is guarded by a small group of enemy soldiers. A new task is created for the players, guiding them to the helicopter's location. The task is completed when the players get close to the helicopter and unlock it. This objective will only spawn on the Altis and Livonia maps.
This commit introduces difficulty scaling to the helicopter capture objective, ensuring it aligns with the mission's overall difficulty settings. The number of guards protecting the helicopter is now determined by the `A3E_Param_EnemyFrequency` setting, and their skill level is set based on the `a3e_var_Escape_enemyMinSkill` and `a3e_var_Escape_enemyMaxSkill` variables. This ensures a consistent and balanced experience for players, as the objective's difficulty will now scale with the rest of the mission.
Comment on lines
+64
to
+76
| // Create task for players | ||
| private _taskID = "A3E_Task_CaptureHeli_" + str (round (random 1000)); | ||
| [ | ||
| "A3E_Task_CaptureHeli", | ||
| true, | ||
| [ | ||
| "An abandoned helicopter has been spotted. If you can capture it, you might be able to use it for extraction. It is likely guarded, so approach with caution.", | ||
| "Capture Helicopter", | ||
| "Capture Helicopter" | ||
| ], | ||
| _heli, | ||
| "CREATED" | ||
| ] remoteExec ["BIS_fnc_taskCreate",-2, _taskID]; |
There was a problem hiding this comment.
It appears that the task was not created correctly and was not working for me. I ended up changing it on my end and I replaced the task creation with just a marker creation with a helicopter icon that would work like the other ammo depots and motor pools on the map.
Suggested change
| // Create task for players | |
| private _taskID = "A3E_Task_CaptureHeli_" + str (round (random 1000)); | |
| [ | |
| "A3E_Task_CaptureHeli", | |
| true, | |
| [ | |
| "An abandoned helicopter has been spotted. If you can capture it, you might be able to use it for extraction. It is likely guarded, so approach with caution.", | |
| "Capture Helicopter", | |
| "Capture Helicopter" | |
| ], | |
| _heli, | |
| "CREATED" | |
| ] remoteExec ["BIS_fnc_taskCreate",-2, _taskID]; | |
| // Set marker | |
| private _taskID = "A3E_Task_CaptureHeli_" + str (round (random 1000)); | |
| [_taskID,_heli,"o_air"] call A3E_fnc_createLocationMarker; | |
| _marker = createMarkerLocal [_taskID,_heli,"o_air"]; | |
| _marker setMarkerShapeLocal "ELLIPSE"; | |
| _marker setMarkerAlphaLocal 0; | |
| _marker setMarkerSizeLocal [50, 50]; |
I changed your task code to the following and it worked fine for me but as I said I ended up removing it:
Suggested change
| // Create task for players | |
| private _taskID = "A3E_Task_CaptureHeli_" + str (round (random 1000)); | |
| [ | |
| "A3E_Task_CaptureHeli", | |
| true, | |
| [ | |
| "An abandoned helicopter has been spotted. If you can capture it, you might be able to use it for extraction. It is likely guarded, so approach with caution.", | |
| "Capture Helicopter", | |
| "Capture Helicopter" | |
| ], | |
| _heli, | |
| "CREATED" | |
| ] remoteExec ["BIS_fnc_taskCreate",-2, _taskID]; | |
| // Create task for players | |
| private _taskID = "A3E_Task_CaptureHeli_" + str (round (random 1000)); | |
| private _taskParams = [ | |
| true, // owner: true for all playable units | |
| _taskID, // taskID: unique task ID | |
| [ | |
| "An abandoned helicopter has been spotted. If you can capture it, you might be able to use it for extraction. It is likely guarded, so approach with caution.", // Description | |
| "Capture Helicopter", // Title | |
| "Capture Helicopter" // Marker (deprecated) | |
| ], | |
| objNull, // destination: objNull = hidden on the map | |
| "CREATED", // state: initial state is "CREATED" | |
| -1, // priority: Don't auto assign | |
| false // showNotification: true to show notification | |
| ]; | |
| _taskParams remoteExec ["BIS_fnc_taskCreate", allPlayers]; // Execute BIS_fnc_taskCreate on all clients |
|
The function was not running for me, I was getting an error regarding an undefined variable in fn_initServer.sqf. I had to add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new dynamic objective to capture a helicopter.
This new objective spawns a helicopter with enough seats for the current number of players. The helicopter is guarded by a small group of enemy soldiers.
A new task is created for the players, guiding them to the helicopter's location. The task is completed when the players get close to the helicopter and unlock it.
This objective will only spawn on the Altis and Livonia maps.