Jump to content
Sign in to follow this  
Fireball

Insurgency

Recommended Posts

getmarkerPos "exclude_location") > 100

Change the 100 to a higher number,it's the distance from the marker that excludes grids, in meters of course.

Thank you! I could swear I tried that before, but I must have made an error somewhere - it works perfectly to exclude the three grids in the airbase. Now i just need to figure out how to add a second exclusion marker to the code. This does not work:

LINE 19--> && !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) && (_x distance (getmarkerPos "exclude_location") > 600)[color="#FF0000"] && (_x distance (getmarkerPos "exclude_location_1") > 100)[/color]

...where I am simply adding another instance of the getmarkerPos command along with a second appropriately named marker.

*EDIT* The above code DOES indeed work, if you spell the names of your markers correctly!

Edited by Harzach

Share this post


Link to post
Share on other sites

I'm in no way decent with SQF, but maybe try this

LINE 19--> && !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) && (_x distance (getmarkerPos "exclude_location" [color=red]&& "exclude_location_1"[/color]) > 600)

Or even copy and paste the entire line with the other marker name.

Share this post


Link to post
Share on other sites
I'm in no way decent with SQF, but maybe try this

LINE 19--> && !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) && (_x distance (getmarkerPos "exclude_location" [color=red]&& "exclude_location_1"[/color]) > 600)

That definitely won't work but the original posted definitely should unless you have an error with the bracketing or something.

Share this post


Link to post
Share on other sites

Update!

No more error in the .rpt. But now, the MHQ is stuck at the debug area.

Triple edit.

All fixed. Apologies

Edited by Cards525

Share this post


Link to post
Share on other sites
That definitely won't work but the original posted definitely should unless you have an error with the bracketing or something.

Or perhaps ... a spelling error.

Feeling kind of dumb about that one, but everything is working great now. Thanks to everyone for the help!

Next on the punch list: Figure out why all of my statics and fortifications are disappearing. But that's not for this topic.

Share this post


Link to post
Share on other sites
Update!

No more error in the .rpt. But now, the MHQ is stuck at the debug area.

Triple edit.

All fixed. Apologies

Wanna post the solution just in case someone in the future needs it, old friend? ;)

---------- Post added at 06:01 PM ---------- Previous post was at 05:59 PM ----------

Or perhaps ... a spelling error.

Feeling kind of dumb about that one, but everything is working great now. Thanks to everyone for the help!

Next on the punch list: Figure out why all of my statics and fortifications are disappearing. But that's not for this topic.

I've run into a similar problem, any friendly static defenses I place always dismount by themselves, then just sit somewhere for the rest of the mission. I think this is part of the Insurgency scripts because I noticed enemy static gunners will dismount sometimes as well...

For now I just use Bradley's with no fuel and unlimited armor and ammo for base defense.

Share this post


Link to post
Share on other sites
I've run into a similar problem, any friendly static defenses I place always dismount by themselves, then just sit somewhere for the rest of the mission. I think this is part of the Insurgency scripts because I noticed enemy static gunners will dismount sometimes as well...

For now I just use Bradley's with no fuel and unlimited armor and ammo for base defense.

For me, they not only dismount, the statics (M2 tripod, small bunker [desert]) actually disappear. Other statics will do this as well, though it is not consistently repeatable. Sometimes they stick around for a while, sometimes not. I even saw a map object disappear once (the small bunker [desert] at the entrance to the airbase). I'll probably do the same as you and add M2 HMMWVs. Thanks again!

Share this post


Link to post
Share on other sites

Oh, yeah they disapear as well. I definitely want to look into it at some point..and if I ever figure it out I'll post here and drop ya a PM

Share this post


Link to post
Share on other sites
Lame questions here...

Where do you install the files?

If you're looking to simply play them, the .PBO goes into your arma 2 folder / MPMissions

Now if you want to edit them, unpbo them and put them in username/documents/ arma 2 other profiles/ MPmissions

Share this post


Link to post
Share on other sites
Lame questions here...

Where do you install the files?

Which files do you mean?

Share this post


Link to post
Share on other sites
Which files do you mean?

Nevermind, thought there were addon files.

Thank you very much for the replies.

USMCRP

Share this post


Link to post
Share on other sites

Well, you may need certain maps or other add-ons depending upon the server and what version they are running. Using Six Updater is a relatively easy way to sync up with whatever server you join.

Share this post


Link to post
Share on other sites

More fun.

This happened when I changed the group sizes to 10 people and added more players.

Now I can't load into the single player editor to test. :l

File C:\Users\Cypher\Documents\ArmA 2 Other Profiles\PV2%20Grunyev%2eC%20[75%2f4SFG]\missions\4SFG_ace_insurgency1_50.fallujah\common\functions.sqf, line 120
Error in expression <itman118","Hitman119","Hitman120"							"Hitman121","Hitman122","Hitman123","Hit>
 Error position: <"Hitman121","Hitman122","Hitman123","Hit>
 Error Missing ] 

:l

I added everything correctly to the defines (I hope)

#define westPlayerStrings	["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115","Hitman116","Hitman117","Hitman118","Hitman119","Hitman120"\
						"Hitman121","Hitman122","Hitman123","Hitman124","Hitman125","Hitman126","Hitman127","Hitman128","Hitman129","Hitman130"\
						"Hitman131","Hitman132","Hitman133","Hitman134","Hitman135","Hitman136","Hitman137","Hitman138","Hitman139","Hitman140"\
						"Hitman141","Hitman142","Hitman143","Hitman144","Hitman145","Hitman146","Hitman147","Hitman148","Hitman149","Hitman150"\
						"Hitman151","Hitman152","Hitman153","Hitman154","Hitman155","Hitman156","Hitman157","Hitman158","Hitman159","Hitman160"\

#define squadNumber(X)      call compile toString[toArray(str X) select 7]
#define squadString(X)      ("Hitman1" + str squadNumber(X))
#define squadUnitStrings(X)	[X+"1",X+"2",X+"3",X+"4",X+"5",X+"6",X+"7",X+"8",X+"9",X+"10"]
#define unitNumber(X)		call compile toString[toArray(str X) select (count toArray(str X) - 1)]
#define vehicleSquad(X)     (call compile ("Hitman1" + str unitNumber(X)))
#define getName(X)          (playerNames select (westPlayerStrings find str X))
#define squadLeader(X)      (squadString(X)+"1")

Share this post


Link to post
Share on other sites

I can send you what my defines.sqf looks like, once I get home tomorrow. I had changed group sizes without issue, butI never really added MORE groups. But maybe it'll still be of some help! ;)

Share this post


Link to post
Share on other sites
More fun.

This happened when I changed the group sizes to 10 people and added more players.

Now I can't load into the single player editor to test. :l

File C:\Users\Cypher\Documents\ArmA 2 Other Profiles\PV2%20Grunyev%2eC%20[75%2f4SFG]\missions\4SFG_ace_insurgency1_50.fallujah\common\functions.sqf, line 120
Error in expression <itman118","Hitman119","Hitman120"                            "Hitman121","Hitman122","Hitman123","Hit>
 Error position: <"Hitman121","Hitman122","Hitman123","Hit>
 Error Missing ] 

:l

I added everything correctly to the defines (I hope)

#define westPlayerStrings    ["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115","Hitman116","Hitman117","Hitman118","Hitman119","Hitman120"\
                           "Hitman121","Hitman122","Hitman123","Hitman124","Hitman125","Hitman126","Hitman127","Hitman128","Hitman129","Hitman130"\
                           "Hitman131","Hitman132","Hitman133","Hitman134","Hitman135","Hitman136","Hitman137","Hitman138","Hitman139","Hitman140"\
                           "Hitman141","Hitman142","Hitman143","Hitman144","Hitman145","Hitman146","Hitman147","Hitman148","Hitman149","Hitman150"\
                           "Hitman151","Hitman152","Hitman153","Hitman154","Hitman155","Hitman156","Hitman157","Hitman158","Hitman159","Hitman160"\

#define squadNumber(X)      call compile toString[toArray(str X) select 7]
#define squadString(X)      ("Hitman1" + str squadNumber(X))
#define squadUnitStrings(X)    [X+"1",X+"2",X+"3",X+"4",X+"5",X+"6",X+"7",X+"8",X+"9",X+"10"]
#define unitNumber(X)        call compile toString[toArray(str X) select (count toArray(str X) - 1)]
#define vehicleSquad(X)     (call compile ("Hitman1" + str unitNumber(X)))
#define getName(X)          (playerNames select (westPlayerStrings find str X))
#define squadLeader(X)      (squadString(X)+"1")

Replace the last \ after "Hitman160" with a ]

Share this post


Link to post
Share on other sites
Replace the last \ after "Hitman160" with a ]

Oh, sorry, the one I sent you wasn't the right one.

#define westPlayerStrings	["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115","Hitman116","Hitman117","Hitman118","Hitman119","Hitman120"\
						"Hitman121","Hitman122","Hitman123","Hitman124","Hitman125","Hitman126","Hitman127","Hitman128","Hitman129","Hitman130"\
						"Hitman131","Hitman132","Hitman133","Hitman134","Hitman135","Hitman136","Hitman137","Hitman138","Hitman139","Hitman140"\
						"Hitman141","Hitman142","Hitman143","Hitman144","Hitman145","Hitman146","Hitman147","Hitman148","Hitman149","Hitman150"\
						"Hitman151","Hitman152","Hitman153","Hitman154","Hitman155","Hitman156","Hitman157","Hitman158","Hitman159","Hitman160"\
						"Hitman161","Hitman162","Hitman163","Hitman164","Hitman165","Hitman166","Hitman167","hitman168","Hitman169","Hitman170"] 

And Khaki, I didn't add more groups :( Its the standard 6 groups.

Share this post


Link to post
Share on other sites

Uh, fixed it by replacing the \'s with ,'s, but now I got this.

File C:\Users\Cypher\Documents\ArmA 2 Other Profiles\PV2%20Grunyev%2eC%20[75%2f4SFG]\missions\4SFG_ace_insurgency1_50.fallujah\common\defines.sqf, line 65
Error in expression <167","Hitman168","Hitman169","Hitman170"]

>
 Error position: <]

>
 Error Missing ;

EDIT:

#define westPlayerStrings	["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115","Hitman116","Hitman117","Hitman118","Hitman119","Hitman120",\
						"Hitman121","Hitman122","Hitman123","Hitman124","Hitman125","Hitman126","Hitman127","Hitman128","Hitman129","Hitman130",\
						"Hitman131","Hitman132","Hitman133","Hitman134","Hitman135","Hitman136","Hitman137","Hitman138","Hitman139","Hitman140",\
						"Hitman141","Hitman142","Hitman143","Hitman144","Hitman145","Hitman146","Hitman147","Hitman148","Hitman149","Hitman150",\
						"Hitman151","Hitman152","Hitman153","Hitman154","Hitman155","Hitman156","Hitman157","Hitman158","Hitman159","Hitman160",\
						"Hitman161","Hitman162","Hitman163","Hitman164","Hitman165","Hitman166","Hitman167","hitman168","Hitman169","Hitman170"]

Fully correct version.

Edited by Cards525

Share this post


Link to post
Share on other sites

Cards -

Just me thinking here, but perhaps try 9-man squads? "Hitman120" would be "Hitman 1-2-0" in-game (and would follow for Hitman130-170), which may be why it isn't working.

Share this post


Link to post
Share on other sites

Oh, sorry - thought you were still getting an error.

Share this post


Link to post
Share on other sites

More Super happy fun time editing.

How would I blacklist an area to prevent insurgents from spawning in it?

IE : An Airfield.

(Isla Duala, Northen airfield is full of insurgent spawns and Im making the FOB centered there... Help)

Share this post


Link to post
Share on other sites

I just went through this a few weeks ago - here's the info I culled from this topic (credit to Cuel):

Place a marker centered on your chosen exclusion area. Name it "exclude_location" or whatever makes sense to you.

In common\functions.sqf, locate the findhouses function and change it to:

findHouses = { 
   private ["_buildings","_minPositions","_enterables","_alive"];
   _buildings = nearestObjects [_this select 0, ["House"], _this select 1]; 
   _minPositions = (_this select 2) - 1;
   _alive = _this select 3;

   _enterables = [];     
   { 
       if (
           format["%1", _x buildingPos _minPositions] != "[0,0,0]" 
       && EP1HOUSES 
       && !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) && (_x distance (getmarkerPos "exclude_location") > 100 //THIS IS THE LINE WE ARE EDITING
       )) then { 
           _enterables set [count _enterables, _x]; 
       }; 
   } forEach _buildings; 
   _enterables
};  

The ">100" is the radius of effect from the marker you placed. Obviously, you can change this to whatever value suits your particular situation.

To add another exclusion area, just add another marker and name it appropriately, then add it to line 19 (the default line):

&& !(typeOf _x in ILLEGALHOUSES) && (alive _x || !_alive) && (_x distance (getmarkerPos "exclude_location") > 600) && (_x distance (getmarkerPos "exclude_location_1") > 100)

I use this method in conjunction with "#define EP1houses true" in the [missionname]\defines.sqf to maximize AI spawn areas while maintaining the ability to exclude them from airbases/FOBs/whatever.

Edited by Harzach

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  

×