Jump to content
Sign in to follow this  
fun|sniper

Arma 3 Randomize Sector Help

Recommended Posts

Hello,

I am making a domination (type of) map. I was wondering if there was a way to have sectors (gamelogic) automatically and randomly picked. I was also wondering if there was a way not to spawn all enemies at the beginning of map start. Finally, I was wondering how to get the sector marker colors not appear until randomized activation of the gamelogic. Thanks for your help in advance, and so you know I am an intermediate editor not an expert. Sorry for asking so much but I would like to try and keep it to one thread.

Game: Arma 3

Mission type: Sector Capture/Domination (gametype)

Regards/thanks,

FUN|Sniper

Share this post


Link to post
Share on other sites

Never used the sectir modules. Would it be possible to place all the sectors and just delete random ones instead?

Share this post


Link to post
Share on other sites

No, probably not. I have some code but it is not working. deadunits = 0;

SMunits = [];

sectorup = false;

_sectors = ["d_target_0","d_target_1","d_target_2","d_target_3","d_target_4","d_target_5","d_target_6","d_target_7","d_target_8","d_target_9","d_target_11","d_target_12","d_target_13","d_target_14","d_target_15","d_target_16"]

while {true} do {

waitUntil {!sectorup};

_sectorselected = _sectors call BIS_fnc_selectRandom;

_sectors = _sectors - [_sectorselected];

_random = round(random 3) + 1;

for "_i" from 0 to _random do

{

_randomPos = [[[getPos _sectorselected, random 300 + 200]],["water","out"]] call BIS_fnc_randomPos;

_spawnGroup = [_randomPos, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam")] call BIS_fnc_spawnGroup;

nul = [_spawnGroup,getpos _sectorselected, random 400 + 300] call BIS_fnc_taskPatrol;

{_x addEventHandler ["Killed",{deadunits = deadunits + 1}];} foreach units _spawnGroup;

SMunits = SMunits + (units _spawnGroup);

};

_hint format ["Clear sector %1",_sectorselected];

sectorup = true;

sleep 2;

waitUntil {deadunits > count SMunits / 2};

sectorup = false;

if (count _sectors < 1) exitWith {hint "You have cleared all sectors. Mission Complete."; sleep 5; "END1" call BIS_fnc_endMission; };

hint format ["Sector %1 cleared.",_sectorselected];

deadunits = 0;

{deletevehicle _x} foreach SMunits;

SMunits = [];

};

Never used the sectir modules. Would it be possible to place all the sectors and just delete random ones instead?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×