forked from igorkis-scrts/A3-Antistasi-Plus
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from SilenceIsFatto/invader-emergence
Invader return framework
- Loading branch information
Showing
5 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
17 changes: 17 additions & 0 deletions
17
A3A/addons/ultimate/functions/REINF/fn_invaderComeback.sqf
This file contains 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
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
35
A3A/addons/ultimate/functions/REINF/fn_setInvaderState.sqf
This file contains 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
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]; |
This file contains 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
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; |