Announcement

Collapse
No announcement yet.

Urban Unit Placement Made Easy

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Urban Unit Placement Made Easy

    I recently discovered an awesome way to place units exactly where you want them in arma 2 and arma 3. For instance, a sniper on top of a radio tower or on top of a hill. Or an infantryman in the corner of a room the good guys will have to storm. The main application of this is urban placement, that is placement in and around buildings but not the only. The basic rule is it places units where you are standing, facing where you are. I hope this helps mission makers place infantry units in the many buildings of Altis and Takistan with enemies.

    This method works for BOTH ArmA 3 and ArmA 2.



    The New Way:
    Lets say I want to place a rifleman, let’s call him A1, inside a building, but there is no building position there.

    Step 0.) Place a player unit on your map in the editor.

    1.) Place a trigger on your map, and make it radio activated and “repeatable.”

    2.) Then for on action copy in “
    Code:
     copyToClipboard format ["this setPosATL %1;this setDir %2;",getPosATL player, getDir player];
    “ I used radio Alpha, so for me to activate it was 0-0-1. When called this trigger will take the position of your player, and the direction of your player, and put them on your clipboard.

    3.) Now walk to where ever you want your AI to be, for instance inside a building, or on a rooftop, and face the direction you want him to face, and use your radio trigger.

    4.) Next ALT+TAB and open up notepad or notepad++. (Could be any text program, I just use these.)

    5.) Now use your standard PASTE function. (Typically CTRL+V.) A line should appear that looks something like:
    Code:
    this setPosATL [2894.34,6077.85,3.99657];this setDir 324.891;
    5(b) Take the directional value, here "324.891" and copy it into the Azimuth box on the lower left of the unit editing screen. This will set the direction of the unit.

    6.) Now go back into the game, and back into the editor. Place your rifleman A1 anywhere on the map. Then open him up and in the Init, paste the line of copied code from your notepad or other text file. So now his Init should read:
    Code:
    this setPosATL [2894.34,6077.85,3.99657];this setDir 324.891;
    Hit “OK.”

    7.) Make sure your PLAYER unit is NOT on the spot you want your rifleman A1 on.

    8.) Then hit Preview the mission. The rifleman should be standing on the location you copied, (inside a building for instance) and facing the direction you were facing. Height is included in this, so it doesn’t matter if he is on the roof, or on the third story, or whatever.


    Why this is an improvement:
    The Old Way: Previously I had simply placed the unit myself in the editor manually, and then used “this setDir 16.8014;” for the direction I wanted the unit to face. Doing this in buildings was tricky, as building edges are not always correctly rendered in the 2d editor, so a guy placed inside a building according to the 2d editor was actually outside the building when you loaded the game. Then you had to go back and replace him, and check again. This made populating structures with many infantry a real chore.

    This new way vastly improves placing guys in the interior of buildings. Previously it was very hard to populate structures, especially ones that were not BIS made, because they did not have standard “positions.” This gets rid of all that, and removes the restriction to only certain locations. You could do this before manually, but it involved some guesswork and trial and error. This is much faster.


    Other Related Useful Information for Urban Placement
    Getting AI to sit still:
    Remember you can use
    Code:
    this forceSpeed 0
    to force the unit to stay put. Otherwise they might choose to run away when combat starts. A second option for the same result is this disableAI "move"; but I think disableAI makes them unable to turn their bodies, whereas forceSpeed lets them rotate in place.


    Getting AI to hold a stance:
    The command is
    Code:
    This setUnitPos "middle";
    to force them to be crouched. ( “UP” for standing, and “DOWN” for prone.) This is useful if you want AI to man a bunker, standing and shooting from it, and not go prone when the first bullet fires. Or if you want them to shoot from a window, which requires them to be crouched.

    So if we put it all together, our rifleman's init would look like:
    Code:
    this setPosATL [3360.86,3567.42,3.62565];this setDir 122.362; this forceSpeed 0; This setUnitPos "middle";
    Last edited by Unkl; 09-16-2013, 09:48 AM.
    The question foremost in my mind is "what will bring the most tactical fun to the server?"

  • #2
    Re: Urban Unit Placement Made Easy

    This is awesome. Now I can populate the buildings with ease.

    Comment


    • #3
      Re: Urban Unit Placement Made Easy

      Originally posted by |TG| B View Post
      This is awesome. Now I can populate the buildings with ease.
      ut-oh!!!!!

      Comment


      • #4
        Re: Urban Unit Placement Made Easy

        VERY nice Garthra, good to see you back :)

        TGU Instructor TG Pathfinder

        Former TGU Dean Former ARMA Admin Former Irregulars Officer

        "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

        Comment


        • #5
          Re: Urban Unit Placement Made Easy

          Awesome great mind's think alike. I was toying around with this as well. Just throw this into a sqf file and then just include it when developing a new mission. If you're in testing locally on an MP server it will spit out an update each time it checks.

          Code:
          while {true} do
          {
          	player globalChat format ["ATL %1 DIR %2", getposatl player, getdir player];
          	copyToClipboard ("this setPosATL " + str(getposatl player) + "; this setDir " + str(getdir player) + ";");
          	sleep 2;
          };
          sigpic

          Comment


          • #6
            Re: Urban Unit Placement Made Easy

            Glad this is helpful to you guys! :) Can't wait to see more urban combat type missions.

            Two followup notes:

            Mass Production / Efficiencies of Scale
            One additional point: When populating mission it may be useful to do this in groups, instead of single soldiers. For instance copy/paste 5 or 10 positions in one building, placing each into your notepad. Then, after you have done 1 or 2 structures in this way, go into the editor and place those 5 or 10 infantry, than walk thorugh and check it. This saves you time in the long run over doing the proccess for each guy, especially on Altis, where the map load time is longer (at least for me) than previous maps.

            In Game Direction vs. Editor Direction
            For some units (targets for instance, and some furniture such as folding chairs) the direction the unit points (if you check the mission.sqf file, or the editor,) is not the direction it appears to point in game. This is because of the difference between what the programing considers the "front" of the object and the normal human understanding of front.

            For instance, all targets in ArmA 3 are programed so that the "front" (the direction you would put into the editor, or into the Init to change its direction) are the back the of the target. So to make a target which was designed to be shot from the north in game, and so faced north, you would put in "this setDir 180;". However, if you wanted a rifleman (or any playable unit) to face north, you would put "this setDir 0" in his init.
            The question foremost in my mind is "what will bring the most tactical fun to the server?"

            Comment


            • #7
              Re: Urban Unit Placement Made Easy

              CORRECTION: regard to the setting the DIRECTION of the unit.

              Direction of Infantry:
              Placing infantry you need to place the number in the "this setDir XXX.XXX" section in the "Azimuth" box on the left side of the unit editing screen. It is NOT sufficient to merely put the direction into the INIT line along with the location. Merely setting the direction in the INIT will NOT result in accurate directional facing. You must place the direction in the AZIMUTH box.

              I did all my testing with targets, and oddly the facing works perfectly with targets with just the INIT line.
              But with "living" units: Take the value which you copy out for the units direction, and place it in the Azimuth box.

              Sorry for not testing more completely before posting. Thank you to whoever told me they were getting wrong facing units using this method, it made me go back and retest it.


              Would an admin please EDIT MY INITIAL POST to include the following as part of Step 5.
              Code:
              Step 5(b) Take the directional value, here "324.891" and copy it into the Azimuth box on the lower left of the unit editing screen. This will set the direction of the unit.
              The question foremost in my mind is "what will bring the most tactical fun to the server?"

              Comment


              • #8
                Re: Urban Unit Placement Made Easy

                Placing the number in azimuth comment worked like a charm Garthra... Thanks for following that up... Now ultimate house clearing starts.

                Comment

                Connect

                Collapse

                TeamSpeak 3 Server

                Collapse

                Advertisement

                Collapse

                Twitter Feed

                Collapse

                Working...
                X