static spawning question

Zeehond23

Valued Member!
Hi,

suppose I make a spawnmarker the size of the map, and let 12 squads spawn on that marker. Would they all spawn in the same place or would they spawn in on different places?
 
hi yes you must add a marker but after you have 3 choise like :
"fortify" -> the group will search for nearby buildings and move in them. They will stay there until an enemy spotted, then they will chase him.
"ambush" -> the group will look for a nearby road, and setup an ambush. They will not move until an enemy was spotted.
"patrol" -> the group will patrol random waypoints in the area, and engage any enemy they see.
you can change the setMarkerSize and setMarkerDir
 
Hi,

suppose I make a spawnmarker the size of the map, and let 12 squads spawn on that marker. Would they all spawn in the same place or would they spawn in on different places?

From my experience, each group would spawn at a different random location within the marker.

The Function is called by

Code:
// get a random starting position that is on land
_rndpos = [_patrol_area_name] call SHK_pos;

Which is in your SAR_setup_AI_patrol.sqf

You can look through the code in the SHK_pos Folder and get a fairly good idea of how it's doing it, but the run down is. The Coords you place for the center of you maker acts like an "Anchor". SHK_pos takes that anchor and generates a random location from it without exceeding the Size you defined in the array

Code:
_this setMarkerSize [10, 10];

Within each defined marker inside SAR_cfg_grps_chernarus.sqf (or whatever map you are using)

That's the long answer.
Short answer.

Yes. All twelve squads would most likely start at different locations barring the random chance the scripts chose the same place twice.
 
Back
Top