Skip to content

Commit

Permalink
Merge pull request #236 from SilenceIsFatto/invader-emergence
Browse files Browse the repository at this point in the history
Invader return framework
  • Loading branch information
AUC-bot authored Jul 28, 2024
2 parents f5099dc + a60d21c commit f37288c
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 0 deletions.
3 changes: 3 additions & 0 deletions A3A/addons/scrt/Stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,9 @@
<Korean>&lt;t size='0.6'&gt;%3의 &lt;t size='0.6' color='%1'&gt;%2&lt;/t&gt;이 항복했습니다. 그들의 지원 경로는 차단될 것이고 더 이상 우리를 공격하지 않을 것입니다. 축하합니다!&lt;/t&gt;</Korean>
<French>&lt;t size='0.6'&gt;&lt;t size='0.6' color='%1'&gt;%2&lt;/t&gt; sur %3 se sont rendues. Leur axe de soutien sera fermé et elles ne lanceront plus d'attaque contre nous. Félicitations !&lt;/t&gt;</French>
</Key>
<Key ID="STR_comms_mp_faction_return">
<Original>&lt;t size='0.6'&gt;&lt;t size='0.6' color='%1'&gt;%2&lt;/t&gt; forces on %3 have returned with help from an unknown force. Their support corridor will be re-opened and they will likely launch attacks on us!&lt;/t&gt;</Original>
</Key>
<Key ID="STR_comms_mp_recon_prisoner_success">
<Original>&lt;t size='0.6'&gt;&lt;t size='0.6' color='#988df7'&gt;Interrogated combatant&lt;/t&gt; shares approximate enemy positions.&lt;/t&gt;</Original>
<Russian>&lt;t size='0.6'&gt;&lt;t size='0.6' color='#988df7'&gt;Допрошенный солдат&lt;/t&gt; делится примерным местоположением противника в округе.&lt;/t&gt;</Russian>
Expand Down
3 changes: 3 additions & 0 deletions A3A/addons/ultimate/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class CfgFunctions
{
file = QPATHTOFOLDER(functions\REINF);
class blackMarketVehiclePrice {};
class invaderComeback {};
class setInvaderState {};
class simpleAttack {};
};
class patches
{
Expand Down
17 changes: 17 additions & 0 deletions A3A/addons/ultimate/functions/REINF/fn_invaderComeback.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
["emergence"] call A3U_fnc_setInvaderState;

private _attackCount = 0;
private _attackAmount = 2;

for "_i" from 0 to _attackAmount do {
[Invaders] spawn A3A_fnc_chooseAttack;
_attackCount = _attackCount + 1;

// Wait 5 minutes before choosing another attack
uiSleep 300;
};

// waitUntil {sleep 30; _attackCount >= _attackAmount};

// private _possibleTargets = airportsX + outposts + seaports + factories + resourcesX + milbases;
// _possibleTargets = _possibleTargets select {sidesX getVariable [_x,sideUnknown] == teamPlayer};
35 changes: 35 additions & 0 deletions A3A/addons/ultimate/functions/REINF/fn_setInvaderState.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
params [
["_state", ""]
];

if !(isServer) exitWith {false};

private _text = "";

switch (_state) do
{
case "defeated":
{
"CSAT_carrier" setMarkerAlpha 0;
areInvadersDefeated = true;
};
case "emergence":
{
"CSAT_carrier" setMarkerAlpha 1;
areInvadersDefeated = false;

_text = format [
localize "STR_comms_mp_faction_return",
"#800000",
A3A_faction_inv get "name",
([] call SCRT_fnc_misc_getWorldName)
];

A3A_resourcesAttackInv = 500;
A3A_resourcesDefenceInv = 500;
};
};

publicVariable "areInvadersDefeated";

[petros, "announce", _text] remoteExec ["A3A_fnc_commsMP", 0];
21 changes: 21 additions & 0 deletions A3A/addons/ultimate/functions/REINF/fn_simpleAttack.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
params [
["_target", ""],
["_vehCount", 5],
["_origin", "CSAT_carrier"],
["_modifiers", ["specops"]]
["_delay", 30],
["_side", Invaders],
["_pool", "attack"],
];

private _data = [
_side,
_origin,
_target,
_pool,
_vehCount,
_delay,
_modifiers
] call A3A_fnc_createAttackForceMixed;

_data;

0 comments on commit f37288c

Please sign in to comment.