Announcement

Collapse
No announcement yet.

[Script] PlaceInBuilding script by DaveP

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

  • [Script] PlaceInBuilding script by DaveP

    Add the following to the init of you unit:
    [this] exec "PlaceInBuilding.sqs"

    Then the unit will be placed into the nearest building. I just had it work on placing targets in buildings too. Does not require the compileLineNumbers line in the init.sqf and the square brackets around "this" are required in the units init field.

    http://www.mediafire.com/?5ov64z8rtlgrcor
    Last edited by Unkl; 03-09-2012, 06:50 AM.
    |TG-189th| Unkl
    ArmA 3 Game Officer
    Dean of Tactical Gamer University
    189th Infantry Brigade Member
    SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
    "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

  • #2
    Re: [Script] PlaceInBuilding script by DaveP

    "Invalid or Deleted File." File no longer available at Mediafire. Looks promising though.
    sigpic
    [squadl][conduct]



    Comment


    • #3
      Re: [Script] PlaceInBuilding script by DaveP

      Love it. Use it. Treasure it.

      You guys will see soon...

      Comment


      • #4
        Re: [Script] PlaceInBuilding script by DaveP

        I think this is the code updated and all.... there is also this modification of it
        - - -

        Comment


        • #5
          I cleaned out the mediafire account & forgot this was in there. Thanks WarFairy.

          Sent thru the ether via Tapatalk.


          NOTE: LINK EDITED TO WORK
          Last edited by Unkl; 03-09-2012, 06:50 AM.
          |TG-189th| Unkl
          ArmA 3 Game Officer
          Dean of Tactical Gamer University
          189th Infantry Brigade Member
          SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
          "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

          Comment


          • #6
            Re: [Script] PlaceInBuilding script by DaveP

            No problem :)
            - - -

            Comment


            • #7
              Re: [Script] PlaceInBuilding script by DaveP


              ; ************************************************** **************
              ; Place infantry in buildings script, by DaveP (BIStudio forum PM for help/info)
              ; Reworked into SQF by DiRaven (BIStudio forum PM for help/info)
              ; Free to use it in whatever and enjoy! Chop and change as you wish (credit is appreciated)
              ;
              ; Place soldier near building of choice, then:
              ; syntax:
              ; unitname execVM "PlaceInBuilding.sqf"
              ;
              ; example:
              ; (unit's init field)
              ; this execVM "PlaceInBuilding.sqs"
              ;
              ;Extra info:
              ;-Removes hand grenades, otherwise dumb infantry try and throw a grenade from inside a building and frag themselves
              ;-Will delete unit if no building position is found
              ; ************************************************** **************
              */
              _unit = _this;
              _arr_buildings = nearestObjects [_unit, ["HOUSE"], 50];
              _buildingcount = count _buildings;

              _arr_positions = [];
              {
              _i = 0;
              _positions_checked = FALSE;
              while {not _positions_checked} do {
              _position = _x buildingPos _i;
              _coord_x = _position select 0;
              _coord_y = _position select 1;
              _coord_z = _position select 2;
              _coord_sum = _coord_x + _coord_y + _coord_z;
              if (_coord_sum == 0) then {
              _positions_checked = TRUE;
              } else {
              _arr_positions = _arr_positions + [_position];
              _i = _i + 1;
              };
              };
              } foreach _arr_buildings;

              if (count _arr_positions == 0) then {
              deleteVehicle _unit;
              };

              _position = _arr_positions select random count _arr_positions;

              _unit setPos _position;
              _unit setDir random 360;

              _unit removeWeapon "HandGrenade_East"; _unit removeMagazines "HandGrenade_East";
              _unit removeWeapon "HandGrenade_West"; _unit removeMagazines "HandGrenade_West";
              _unit removeWeapon "HandGrenade"; _unit removeMagazines "HandGrenade";
              _unit setUnitPos "UP";
              Copy and Paste this into your Notepad (save as other than txt file).

              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

              Connect

              Collapse

              TeamSpeak 3 Server

              Collapse

              Advertisement

              Collapse

              Twitter Feed

              Collapse

              Working...
              X