Jump to content
Sign in to follow this  
SemlerPDX

Straight Wall Generator for Arma 2 and Operation Arrowhead

Recommended Posts

I hate trying to make sandbag walls or hescos line up in the darn Arma 2 mission editor. I googled for a wall generator, but only found one example, for Arma 1, and it didn't work.

So, I wrote this. Not much less tedious than placing walls in the editor, clicking preview, then going back and adjusting, then preview again. Over and over.

At least this way, you end up with an exactly straight wall ready to use in any mission you create forever. Can be copied between different missions without issue.

Again, it's slightly complicated procedure, but it is well worth it. At least I think so - hope others do, too.

Public Download Mission Example w/script:

vg_straight_walls.utes.rar

Snippets from my ReadMe file:

COPY "VGStraightWalls.sqf" to your misson folder and PASTE THESE TWO ACTIONS TO YOUR PLAYER IN EDITOR:

this addAction ["BIS_DEBUG_CAM (right click to exit)","camera.sqs"];
this addAction ["<t color='#DBA901'>VG Straight Wall</t>","VGStraightWalls.sqf",(["Land_HBarrier_large",4,-0.1,0])];

(NOTE: You DO NOT NEED the script "camera.sqs" to use it. Every mission has it, it's invisible!!)

Variables Meanings in the addAction syntax:

this addAction [action, script filename,(["wallType", numberOfWalls, distanceBetweenCorrection, straightAlignmentCorrection])];

Example Class Names of Barriers: "Land_fort_bagfence_long" "Base_WarfareBBarrier10xTall" "Land_HBarrier_large"

STEP ONE: DECIDE ON PARAMETERS

First, decide on a wall type, and number of walls. Adjust the "addAction" variables to suit your needs.

Now, place a dummy barrier on the map for each wall section you want. Give them sequential names.

i.e. "MyWall_1", "MyWall_2", "MyWall_3", etc... placed anywhere, random. Doesn't matter. (see final step)

*see full instructions in mission demo!

STEP TWO: CREATE WALLS

Click Preview, and load in.

Move anywhere and select the "Create Straight Wall" action.

When done, it saves the positions of each wall to your clipboard.

STEP THREE: USE WALL POS DATA

Exit the preview, save your mission, close down Arma, open up a notepad/wordpad and paste (ctrl + v) your wall position data.

it may look like this:

(DELETED!! TOO LONG FOR FORUM POST!!)

Very long, hard to read!!!

Start making it easier by pressing enter after each comma ( , )

like this:

positions copied = [
posWallSection1 = [4391.23,10408.8,0.00143433],
posWallSection2 = [4399.93,10409.3,0.00143433],
posWallSection3 = [4408.62,10409.8,0.00143433],
posWallSection4 = [4417.31,10410.3,0.00143433],
posWallSection5 = [4426.01,10410.8,0.00143433],
posWallSection6 = [4434.7,10411.3,0.00143433],
posWallSection7 = [4443.4,10411.8,0.00143433]]

For "MyWall_1", I would copy just the numbers from posWallSection1: 4391.23,10408.8,0.00143433

and paste it over the old ones in my mission.sqm file like this (just FIND "MyWall" and it lists all of them):

class Item126
{
position[]={4391.23,10408.8,0.00143433}; <--Overwrite these numbers
azimut=150.18291;
id=165;
side="EMPTY";
vehicle="Base_WarfareBBarrier10xTall";
leader=1;
lock="LOCKED";
skill=0.73333329;
text="MyWall_1";
};

Do this for each wall section you created. Paste the new pos into it's respective wall class item entry.

It may be tedious to use this method to create a straight wall, but this is the MOST exact way to do it.

FINAL STEP: POSITION FINAL WALL IN YOUR MISSION

Load Arma into the mission editor, and load your mission.

You should see your new wall, instead of all the random wall placeholders you put down earlier.

Now you can drag and select the entire wall, and move it to wherever you want.

Feel free to copy the wall, and place several more. You can shorten it by deleting some of it's parts.

Though the new names of the barriers will get longer and more odd in format (such as "MyWall_2_1_5_2"),

it should not affect anything negatively in your mission.

You can alleviate this by deleting the names of each barrier and saving your mission before copying the entire

wall for further uses. Remember, you can copy (Ctrl+C) any number of objects from one mission to another inside the editor.

TIPS:

When copying and pasting objects in the editor, you can press Ctrl+Shift+V to paste them onto a new mission in the same position on the map that they were in the previous mission, provided it's the same map.

Ctrl+V will only paste the objects relative to the mouse position.

Use Ctrl+X to delete a large selection of objects: Much faster than the Delete key!

-Hope this helps someone; tried googling it, but only came up with a non-functioning SQS for Arma 1, so I wrote this.

I sure hate trying to manually make straight walls myself!

Edited by SemlerPDX
Download Link broken - Fixed 2014.10.01

Share this post


Link to post
Share on other sites

Useful tutorial, much appreciated as it helped me writing a simple fortification script.

Share this post


Link to post
Share on other sites

*updated download file - demo mission now includes several pre-made straight walls of various types, 10-15 segments long.

Share this post


Link to post
Share on other sites

Thanks I'll see if he's still got the file lying around somewhere...

Share this post


Link to post
Share on other sites

Thanks for the heads up - I've fixed the link in the op, should work now, but I had 2 files - one is 5kb the other is 7kb - users will want the larger one, it has pre-made examples of several straight walls sitting around the sample mission, for easy copy/paste.

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  

×