Announcement

Collapse
No announcement yet.

The Arma2 Scripting Database

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • The Arma2 Scripting Database

    This Thread is for scripts only!


    this thread has been made to have a central location for many of the scripts made by people at TG and other locations! Feel free to add a script to this thread, but please make sure the script is 100% working! If the script is not yours, then please make sure you credit the creator in the post!!

    You may also link to an external source if the script hosted in a zip file.

    To add a script simply use the following tags when posting [code][/code]


    Index
    Last edited by browna3; 12-18-2010, 08:28 AM. Reason: updated Index

  • #2
    Re: The Arma2 Scripting Database

    Random AI weapon fire, (used to fire artillery pieces randomly)

    Code:
    // GeneralCarver Ambient Weapon Fire Script
    // by: GeneralCarver
    // Version: 1
    // Date: Nov. 1, 2009
    // Descrption: This script makes an A.I. unit repeatedly fire a weapon at a specific coordinate. Most aspects of the script can be customized, as described below. This script should be used only for a.i. you place around areas of your map for pure ambience and no combat function.
    
    /*
    How to use the script.
    
    Call it out in the following mannor in your mission init.sqf, a trigger or another script.
    Script callout format:
    scriptvariablename = [unitname, "MARKERNAME", heightabovemarker, magazinecapacity, "weaponname", "magazinename", maxnumberofshotperburst, maxdelaybetweenburstsinseconds, delaybetweenshots] execVM "scripts\ambientweaponfire.sqf";
    
    Callout explainations..
    scriptvariablename: just a normal variable, Any name you want.
    unitname: name of the a.i. unit that is doing the firing. Should be non-playable to cause any problems.
    "markername": name of reference marker in editor that a.i. will fire at.  in string format (i.e. "quoted text").
    heightabovemarker: regular number. ( 1, 3, 10 etc.) Is height in meters above ground for the "z" value of the coordinate the a.i. will watch.
    magazinecapacity: magazine capacity of the weapon the a.i. will be firing.
    weaponname: class name of the weapon the a.i. will fire. string format ("quoted text").
    "magazinename": magazine class name of the magazine in the weapon that the a.i. will fire. String value ("quoted text").
    maxnumberofshotsperburst: number. how many times the a.i. will shoot in a row during a burst of fire.
    maxdelaybetweenburstsinseconds: number. Max number of seconds to wait between bursts of fire. Actual value will be random and less.
    delaybetweenshots: number. Seconds (or milliseconds) between shots. (1, 10, 0.5, 0.2 etc.).
    */
    
    
    
    
    // ==========================================
    // Define Variables
    // ==========================================
    
    
    private ["_unit", "_marker", "_heightoffset", "_magcap", "_weaponname", "_burstcnt", "_delay", "_counter", "_roundsleft", "_initialmagazinecount"];
    _unit = _this select 0;
    _marker = _this select 1;
    _heightoffset = _this select 2;
    _magcap = _this select 3;
    _weaponname = _this select 4;
    _magazineclass = _this select 5;
    _burstcnt = _this select 6;
    _delaymax = _this select 7;
    _shotdelay = _this select 8;
    _roundsleft = vehicle _unit ammo currentweapon vehicle _unit;
    _counter = 0;
    _delay = 0;
    _initialmagazinecount = count magazines vehicle _unit;
    
    
    
    
    // ==========================================
    // Begin Script
    // ==========================================
    
    // Have unit watch the marker.
    _unit dowatch [getmarkerpos _marker select 0, getmarkerpos _marker select 1, _heightoffset];
    sleep 5;
    		
    // the following loop will shoot the gun in bursts repeatedly unitl the conditions are meet.
    while {((alive _unit) && (damage vehicle _unit < 1) && (gunner vehicle _unit == _unit))} do 
    	{
    	// if the weapon magazine is low, add another magazine (sets up infinite ammo for continous fire)
    	if (count magazines vehicle _unit < _initialmagazinecount) then
    		{
    		vehicle _unit addmagazine _magazineclass;
    		};
    	// While loop to fire repeatedly to create bursts of fire.
    	while {_counter <= _burstcnt} do 
    		{
    		vehicle _unit fire _weaponname;
    		_counter = _counter + 1;
    		sleep _shotdelay;
    		};
    	// reset counter, wait a random amount of time topped by the delay limit
    	_counter = 0;
    	_delay = floor(random _delaymax);
    	sleep _delay;
    	};
    Made by General Carver

    Comment


    • #3
      Re: The Arma2 Scripting Database

      GeneralCarver's Vehicle Flip Script

      Date: 12/5/10

      Version: 1

      Compatibility: ArmA2 and ArmA 2: OA

      Description:
      This script will give the player an action to turn a flipped car or bike or ATV right side up.

      Video Demo:




      Installation:
      1. Copy over the "scripts" directory into your mission's directory.
      2. Copy the contents of the init.sqf into your mission's init.sqf
      3. Play and enjoy!



      Use:
      100% open source. Use and edit as you like.

      Download Link:
      http://www.4shared.com/file/FnP0dAmA/gc_veh_flip.html
      (always use this link for most up to date version)
      Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

      Comment


      • #4
        Re: The Arma2 Scripting Database

        Additional Scripts...

        Second Primary Weapon:
        Description: Player can have two primary weapons. Use action menu to switch between the two.
        http://forums.bistudio.com/showthread.php?t=111062

        Backpack Script
        Description: Player gets a client side backpack deployed via their action menu. (Script Intent: Intended for ArmA 2 units, which cannot pickup Arrowhead backpacks)
        http://forums.bistudio.com/showthread.php?t=111087

        Spare Vest Pouch:
        Description: Player gets two client side vest pouch backpacks deployed via their action menu. (Script Intent: Intended for ArmA 2 units, which cannot pickup Arrowhead backpacks)
        http://forums.bistudio.com/showthread.php?t=111113

        Pack Cow Script:
        Description: A pack cow which has a cart and an ammo crate which can be deployed or loaded back up for transport. The cow can be ordered to move around via action menu and map clicking.
        http://forums.bistudio.com/showthread.php?t=110488

        Display Heading Script:
        Description: Displays the heading of a player in degrees adjacent to the compass. Turn on and off via pressing "k" once. (same as compass). Script Intent: Intended to help players see exact heading for calling out contacts or other sightings.
        http://forums.bistudio.com/showthread.php?t=110284
        Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

        Comment


        • #5
          Re: The Arma2 Scripting Database

          GeneralCarver Crew Parajump Manager Script




          Description:
          This script causes the AI or players in the back of an aircraft to eject one at a time in order with a slight delay. The pilot is ignored.

          Compatibility: ArmA, ArmA 2 series, any version.
          NOT RECOMMENDED FOR USE WITH ACE2 MOD!

          How to use...
          Launch the script with the following line of code. The code needs to be executed server side and at the moment you want to units to eject out of plane.
          The plane could be piloted by a human player or A.I. The pilot in the script is ignored.

          gc_crew_parajump_manager_script = [vehiclename, jump delay] execVM "gc_crew_parajump_manager.sqf";

          array elements description...
          vehiclename - name of vehicle which units will be ejecting out of.
          jump delay - pause between crew jumping out. (recommend 0.75 on dedicated server)


          Use:
          100% Open source. Use and modify as you like! Go make great missions!


          Download Link:
          http://www.4shared.com/file/5zD_f9Uk...p_manager.html
          (always use this link for most up to date version)
          Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

          Comment


          • #6
            Re: The Arma2 Scripting Database

            Compatibility: ArmA 2 v1.07 and beyond.

            Description:
            Yet another abomination for ArmA 2! This script allows players to have a parameter in their mission which can be set during the role selection and adjust the A.I. skill level for friend and enemy A.I. in the mission.

            Use:
            100% Open source. Use and modify as desired, but either way.. go make good missions!

            Installation:
            Instructions included in download in Read Me.

            Download Link:
            http://www.4shared.com/file/5SAe7gaO...ll_script.html
            (always use this link for most up to date version)
            Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

            Comment


            • #7
              Re: The Arma2 Scripting Database

              Description:
              This script adds the ability for medics to deploy a medical field tent at their location. This is done via the action menu. The medic can then un-deploy the tent and re-deploy where needed.

              Compatibility: ArmA 2, ArmA 2: OA, ArmA 2: Combined Ops (includes the BAF, and PMC expansion content)

              100% Multiplayer compatible.
              Respawn Compatible


              Use:
              100% Open source. Use or edit as desired.


              Installation:
              1. Copy over the "Scripts" directory to your mission.
              2. Copy the contents of the mission's init.sqf over to your mission's init.sqf. (use the format provided to ensure Join in progress compatability if your mission needs it)

              Download Link:
              http://www.4shared.com/file/U0tiOerd/GC_Med_Tent.html
              (always use this link for most recent release of script)
              Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

              Comment


              • #8
                Re: The Arma2 Scripting Database

                Revive Script

                Compatibility:
                -ArmA 2, ArmA 2: OA, ArmA 2: CO
                -Compatible with all mission mode types.
                -Multiplayer compatible.
                -Maintains inventory load out, backpack, and backpack contents of player upon revive.

                Installation:
                Instructions included in Read Me in download.

                Use:
                100% Open Source. Use, modify or edit as you like.

                Download Link:
                http://www.4shared.com/file/xQHYKJYY...ve_script.html
                Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

                Comment


                • #9
                  I don't know how many of these link might still work but there are sure to be some nice gems or nuggets still in here you mission makers.-
                  |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

                  Connect

                  Collapse

                  TeamSpeak 3 Server

                  Collapse

                  Advertisement

                  Collapse

                  Twitter Feed

                  Collapse

                  Working...
                  X