Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
minor civ plane tweaks, version
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkis-scrts committed Aug 27, 2023
1 parent dde7a4a commit 825a69f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion A3A/addons/core/Includes/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 2
#define MINOR 3
#define PATCHLVL 0
#define PATCHLVL 1
#define BUILD 0
36 changes: 17 additions & 19 deletions A3A/addons/scrt/Encounter/fn_encounter_civPlane.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,25 @@ private _originPosition = position _player;

Info_2("%1 will be used as center of the event at %2 position.", name _player, str _originPosition);

private _finPosition = [_originPosition, 2500, (random 360)] call BIS_fnc_relPos;
private _finPosition = [_originPosition, 3500, (random 360)] call BIS_fnc_relPos;

private _spawnPosition = [_originPosition, 1400, 1600, 0, 0, 1] call BIS_fnc_findSafePos;
private _spawnPosition = [_originPosition, 2400, 2600, 0, 0, 1] call BIS_fnc_findSafePos;
private _civPlaneData = [[(_spawnPosition select 0), (_spawnPosition select 1), 100 + random 200], 0, selectRandom (A3A_faction_civ get "vehiclesCivPlanes"), civilian] call A3A_fnc_spawnVehicle;
private _PlaneVeh = _civPlaneData select 0;
[_PlaneVeh, civilian] call A3A_fnc_AIVEHinit;
private _PlaneCrew = _civPlaneData select 1;

if (random 100 < 30) then {
private _civ = [(_civPlaneData select 2), A3A_faction_civ get "unitPress", [0,0,0], [],0, "NONE"] call A3A_fnc_createUnit;
_civ assignAsCargo _PlaneVeh;
_civ moveInCargo _PlaneVeh;
};
private _planeVeh = _civPlaneData select 0;
[_planeVeh, civilian] call A3A_fnc_AIVEHinit;
private _planeCrew = _civPlaneData select 1;

{[_x] spawn A3A_fnc_civilianInitEH} forEach _PlaneCrew;
private _PlaneGroup = _civPlaneData select 2;
{[_x] spawn A3A_fnc_civilianInitEH} forEach _planeCrew;
private _planeGroup = _civPlaneData select 2;

_groups pushBack _PlaneGroup;
_vehicles pushBack _PlaneVeh;
_groups pushBack _planeGroup;
_vehicles pushBack _planeVeh;

_PlaneVeh flyInHeight (550 + (random 75));
private _height = 550 + (random 150);
_planeVeh flyInHeight _height;
_planeVeh setPosATL (_spawnPosition vectorAdd [0, 0, _height]);
_planeVeh setDir ([_planeVeh, _originPosition] call BIS_fnc_dirTo);
_planeVeh setVelocityModelSpace [0, 100, 0];

private _relativePositions = [];

Expand All @@ -48,18 +46,18 @@ private _relativePositions = [];
} forEach [0, 180];

{
private _wp = _PlaneGroup addWaypoint [_x, _forEachIndex];
private _wp = _planeGroup addWaypoint [_x, _forEachIndex];
_wp setWaypointSpeed "NORMAL";
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
} forEach _relativePositions;

private _wp3 = _PlaneGroup addWaypoint [_finPosition, 3];
private _wp3 = _planeGroup addWaypoint [_finPosition, 3];
_wp3 setWaypointType "MOVE";
_wp3 setWaypointSpeed "NORMAL";

private _timeOut = time + 600;
waitUntil { sleep 5; (currentWaypoint _PlaneGroup == 3) || (time > _timeOut) || !(canMove _PlaneVeh) || !alive (driver _PlaneVeh)};
waitUntil { sleep 5; (currentWaypoint _planeGroup == 3) || (time > _timeOut) || !(canMove _planeVeh) || !alive (driver _planeVeh)};

{[_x] spawn A3A_fnc_vehDespawner} forEach _vehicles;
{[_x] spawn A3A_fnc_groupDespawner} forEach _groups;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ switch (_eventType) do {
[[], "SCRT_fnc_encounter_civHeli"] call A3A_fnc_scheduler;
};
case (CIV_PLANE): {
[[], "SCRT_fnc_encounter_civPLANE"] call A3A_fnc_scheduler;
[[], "SCRT_fnc_encounter_civPlane"] call A3A_fnc_scheduler;
};
case (POLICE): {
[[], "SCRT_fnc_encounter_police"] call A3A_fnc_scheduler;
Expand Down
6 changes: 5 additions & 1 deletion ForkChangelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 2.3.1
### Additions
- New civilian plane flyby random event

## 2.3
### Additions
- Official Aegis support
- Aegis support
- Šumava terrain support
- New enemy group type - reconnaissance patrol, usually it has snipper and spotter in ghillie suits if possible, they may spawn in forests and other wilderness areas. If faction has no ghillie or other suit types, ordinary snipers and spotters will be used
- New Rivals random event - Helicopter Raid, they will try to drop some munition on your heads and then they will loiter in the area to finish survivors if there are any (some rivals faction have only drop part because of lacking required assets in their specific modsets)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</p>
<p>
<a href="https://github.com/igorkis-scrts/A3-Antistasi-Plus/releases/latest">
<img src="https://img.shields.io/badge/Current_Stable_Version-2.3-red" alt="Antistasi Plus Version">
<img src="https://img.shields.io/badge/Current_Stable_Version-2.3.1-red" alt="Antistasi Plus Version">
</a>
</p>
</div>
Expand Down

0 comments on commit 825a69f

Please sign in to comment.