-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#642): started on refactor of standard wave
- Loading branch information
Showing
6 changed files
with
132 additions
and
14 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Functions/Wave Type Libraries/Standard Wave Lib/fn_standardWave_generateManSpawnPosition.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,23 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: BLWK_fnc_standardWave_generateManSpawnPosition | ||
Description: | ||
Gets a spawn position for a unit to a man unit to spawn at. | ||
Parameters: | ||
NONE | ||
Returns: | ||
<PositionATL[]> - A position for a man unit to spawn. | ||
Examples: | ||
(begin example) | ||
private _position = call BLWK_fnc_standardWave_generateManSpawnPosition; | ||
(end) | ||
Author(s): | ||
Ansible2 | ||
---------------------------------------------------------------------------- */ | ||
scriptName "BLWK_fnc_standardWave_generateManSpawnPosition"; | ||
|
||
selectRandom BLWK_infantrySpawnPositions |
49 changes: 49 additions & 0 deletions
49
Functions/Wave Type Libraries/Standard Wave Lib/fn_standardWave_generateMenClassnames.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,49 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: BLWK_fnc_standardWave_generateMenClassnames | ||
Description: | ||
Gets the standard (weighted) list of available men classes. | ||
Parameters: | ||
NONE | ||
Returns: | ||
<(STRING | NUMBER)[]> - A weighted or unweighted array of classnames that | ||
enemy units will spawn from. | ||
Examples: | ||
(begin example) | ||
private _availableClasses = call BLWK_fnc_standardWave_generateMenClassnames; | ||
(end) | ||
Author(s): | ||
Ansible2 | ||
---------------------------------------------------------------------------- */ | ||
scriptName "BLWK_fnc_standardWave_generateMenClassnames"; | ||
|
||
|
||
private _availableClasses = []; | ||
// classes | ||
_availableClasses pushback BLWK_level1Faction_menClasses; | ||
// weight of class | ||
_availableClasses pushBack BLWK_level1Faction_weight; | ||
|
||
if (BLWK_currentWaveNumber >= BLWK_level2Faction_startWave) then { | ||
_availableClasses pushback BLWK_level2Faction_menClasses; | ||
_availableClasses pushBack BLWK_level2Faction_weight; | ||
}; | ||
if (BLWK_currentWaveNumber > BLWK_level3Faction_startWave) then { | ||
_availableClasses pushback BLWK_level3Faction_menClasses; | ||
_availableClasses pushBack BLWK_level3Faction_weight; | ||
}; | ||
if (BLWK_currentWaveNumber > BLWK_level4Faction_startWave) then { | ||
_availableClasses pushback BLWK_level4Faction_menClasses; | ||
_availableClasses pushBack BLWK_level4Faction_weight; | ||
}; | ||
if (BLWK_currentWaveNumber > BLWK_level5Faction_startWave) then { | ||
_availableClasses pushback BLWK_level5Faction_menClasses; | ||
_availableClasses pushBack BLWK_level5Faction_weight; | ||
}; | ||
|
||
|
||
_availableClasses |
Empty file.
Empty file.
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