Forum Jump :

Author Message


Posts: 46
Rank:


Level: Member

Country: nl
Location: Den Haag
Occupation: Mars or Pluto?
Age: 28
In-game name: Desperado070

 
#186325 Posted at 2016-02-09 09:27        
     
So yea i need some help whit how to fill a house efficient.
I'm working me ass off to build a big custom mission line.
1 of the parts is to clear a town, and of-course for that i want a real challenge.
Whit at-least at every house 1 AI or more, so if you gonna put them in manual you run against the cap very fast!
Can't really remember what the cap was, but i reached it at 20% of filling the town +/-.
It is because arma has a Squad cap, and since every guy has to be in no squad or the placements fuck up.
So yea i didn't had much choice then to start scripting them in whit a trigger and sqf file.
What i did was this:

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;
{_x setPos ((nearestBuilding _x) buildingPos 1);} foreach units _mygroup;

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 2);} foreach units _mygroup;

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 5);} foreach units _mygroup;

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 6);} foreach units _mygroup;

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 0);} foreach units _mygroup;

_mygroup = [getmarkerpos "TestWarrior", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 7);} foreach units _mygroup;


_mygroup1 = [getmarkerpos "TestWarrior_1", EAST, 5] call BIS_fnc_spawnGroup;

_wp1 = _mygroup1 addWaypoint [getmarkerpos "wp1", 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointSpeed "Limited";
_wp1 setWaypointBehaviour "SAFE";

_wp2 = _mygroup1 addWaypoint [getmarkerpos "wp2", 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointSpeed "Limited";
_wp2 setWaypointBehaviour "SAFE";

_wp3 = _mygroup1 addWaypoint [getmarkerpos "wp3", 0];
_wp3 setWaypointType "CYCLE";
_wp3 setWaypointSpeed "Limited";
_wp3 setWaypointBehaviour "SAFE";


_mygroup1 = [getmarkerpos "TestWarrior_2", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 1);} foreach units _mygroup1;

_mygroup1 = [getmarkerpos "TestWarrior_2", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 3);} foreach units _mygroup1;

_mygroup1 = [getmarkerpos "TestWarrior_2", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 2);} foreach units _mygroup1;


_mygroup2 = [getmarkerpos "TestWarrior_3", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 1);} foreach units _mygroup2;

_mygroup2 = [getmarkerpos "TestWarrior_3", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 4);} foreach units _mygroup2;

_mygroup2 = [getmarkerpos "TestWarrior_3", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 0);} foreach units _mygroup2;


_mygroup3 = [getmarkerpos "TestWarrior_4", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 0);} foreach units _mygroup3;

_mygroup3 = [getmarkerpos "TestWarrior_4", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 3);} foreach units _mygroup3;

_mygroup3 = [getmarkerpos "TestWarrior_4", EAST, ["O_Soldier_SL_F"],[],[],[],[],[],x] call BIS_fnc_spawnGroup;

{_x setPos ((nearestBuilding _x) buildingPos 4);} foreach units _mygroup3;
It does work, and does exactly whatever i want, however...
I need to look up every building way-point manually and even that ain't the problem.
Because looking them up gives you more control over it then placing them randomly. (mine exp whit random = bugs out)

But after i spawned this list, i needed to go make a new sqf to continue?
Did i do something wrong? or is there a cap on how many squads u can spawn per sqf to?

So i was wondering if someone knows a better way of doing this?

I'm not asking to give me a script that works and does everything for me, most likely i won't even be happy whit it.
I'm just asking if someone can point me in the right direction whit this.


Thanks a lot!

P.s. my scripting skills are very basic keep that in mind.

(ofc the script has only 1 soldier, and the same. i know how to randomize this, this just a test)

Do not go where the path may lead, go instead where there is no path and leave a trail...





Tags: At, Fill, Help, How, Need, Some, To