Jump to content
spelmo3

Populating my AO / sector

Recommended Posts

So i'm working on a little project. similar to I&A  just to learn how to spawn some "dynamic" AO areas and sectors to capture. and to learn some basics with MP scripting
so i've got my random sector working.. (it uses placed markers on a map mrk mrk_1 etc)
it all works flawlessly. but now im stumped onto spawning some AI around the "AO" zone. (the zone is actually a trigger) ive been checking out bis_fnc_spawngroups. but im wondering whats the best way to spawn in AI to this.

I've put a snippet of what i've got so far.  running in my initserver.sqf

 

//for the time being I've limited everying to one case for testing.

//_locations = ["mrk","mrk_1","mrk_2","mrk_3","mrk_4","mrk_5","mrk_6","mrk_7","mrk_8"];

_locations = ["mrk"];

_objType = floor(random(1));
_rndLoc = _locations call BIS_fnc_selectRandom;
switch (_objType) do
{
  	case 0: {zone setPos (getMarkerPos _rndloc); zonetask setPos (getMarkerPos _rndloc);
	// code to spawn or move some opfor AI in my trigger radius to fill out the AO
	};

//I could spawn my AI here without calling it in every case. as _rndloc is the center point of my AO area.
};

also. this is for an MP scenario  please feel free to correct my syntax

Share this post


Link to post
Share on other sites

Check this script I did time ago. It could be useful for your scope.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, Enigx said:

Check this script I did time ago. It could be useful for your scope.

 

Good morning! This looks exactly like what i need! Will give this a go. 

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

×