Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
_units = [getMarkerPos "custom_marker", side, ["soldier_1", "soldier_2"],[],[],[],[],[],180] call BIS_fnc_spawnGroup
you just need to use BIS_fnc_selectRandom to randomly chose the type of unit you want to spawn from your own list, and then have them created by BIS_fnc_spawnGroup.
then you could activate the spawner by radio via a trigger or w/e.
you have to do that loop inside a .sqf file but you can activate it or stop it with a trigger later if you want.
to detect an emeny death you can add an event handler "killed" on the units when you create them. when an enemy will die it will do for example : TOTAL_ENEMIES = TOTAL_ENEMIES - 1.
and then the loop will see TOTAL_ENEMIES < 20 and spawn new units.
SPAWNER = true;
while {SPAWNER} do
{
if TOTAL_UNITS < 20 then
{
"COMMAND TO CREATE A "NEW_UNIT""
}
"NEW_UNIT" addEventHandler ["Killed",{TOTAL_UNITS = TOTAL_UNITS - 1;}]
Sleep, 5000
};
and you can use a trigger to set SPAWNER from true to false if you want to disable it.
*not tested