Results 1 to 6 of 6

Thread: "Automated Loot Harvesting" - example script

  1. #1
    Master Gunnery Sergeant Rydygier's Avatar
    Join Date
    Aug 22 2011
    Location
    Poland, Pomerania
    Posts
    1,067

    "Automated Loot Harvesting" - example script

    Laziness is the father of invention. Lately enjoyed one of those great missions, where part of player's activity is looting battlefields. Sometimes is annoying, when minutes passes on running between the next corpses and car trunk again, and again, while your subordinates all this time are only standing with fingers in their noses... So, I thought, why I, after all team leader, must to do this pretending to be a porter, if these lazy bastards should do it for me? Therefore created a little something, that make them busy with this task instead of me. Mostly for myself, but maybe this will prove useful also for someone else?

    Idea is simple. This script makes, that scattered around area goods go to vehicle's trunk. But not by any kind of miraculous "teleport", no. Player controlled team leader gets new option in action menu - "Loot". If there is no enemy nearby, is some vehicle nearby TL and there are some corpses or simply weapons on the ground (weapon holders) around, then this action will make yours subordinates to harvest for you all this loot into car nearest to yours position (exclude items, binoculars, laserdesignators and NV goggles). If its trunk fills up, rest of loot is placed around vehicle as weapon holders (so you can take away full vehicle and bring another empty car, and repeat order and so on). This is rather crude makeshift, for now only slightly tested, not 100% reliable, with place for many improvements, I'm sure.

    Notes:

    1. Looters are running around, but there is no used animations for collect and drop process, because noticed, that any animation usage makes script less reliable, somehow animations usually are troublemaking;
    2. When looting, radio confirmations are silenced, otherwise radio is spammed by running all the time here and there team members;
    3. Make sure, that it is safe before start loot procedure - this shouldn't be interrupted by other orders before end, also at start team members leave own equipment on the ground to make room for loot. Only when harvest is done, they will pick up their weapons back;
    4. It is not action-based, had random troubles with pickup/drop weapon/magazine actions, so decided to make own substitute from the scratch.

    Here is script inside simpe demo and pbo addon (needs CBA), that makes this feature available for any mission, enjoy:

    ALH

    (in demo script version is activated by Juliet radio channel (0-0-0), if used with pbo version, "Loot" option will be available at start)

  2. #2
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    Thanks for sharing man.

    "Learn by doing!" - Quoted from a post by Imutep

    OUTERRA - OUTERRA - OUTERRA - OUTERRA - BLOWMIND!

  3. #3
    Master Gunnery Sergeant Rydygier's Avatar
    Join Date
    Aug 22 2011
    Location
    Poland, Pomerania
    Posts
    1,067
    Author of the Thread
    I did some testing, that is, played a game with this script, and noticed some problems, so added two things:

    - New action: "Stop Loot", for manually finish harvesting process, if neccessary - in such case team memebers will immediatelly return at their initail positions and re-arm with their stuff. If some is carying loot, then this loot will be dropped. However looting shouldn't be again acitvated before units pick up their stuff, otherwise they will be traeted as unarmed, and their stuff as loot to collect;
    - back-up code for "stuck" situations, eg when some body with loot can't be reach by looter or in some other, misterious for now, situations, when looter just stands still. Now, if looter remain static for longer, than minute beacuse of implemented waitUntils, then current waitUntil is ended (waitUntils are used to make script wait until unit finish its movement (is close enough) to corpse or cargo before loot transfer begins, if interrupted, then trasfer will occur at current distance, regardless, how big).

    Known issues:

    - mentioned "stuck issue" for uknown reason (probably movement ends (not know, why), before unit gets close enough to meet waitUntil condition) sometimes;
    - units with binoculars are troublemakers, because they have a habit to use binocular often, what makes them unavailable for a long while - especially, when unit haven't any other weapon. This is however game issue (feature?);
    - rarely happens, that after looting unit is going back at it's stuff position, but not pick it up. In such case TL must manually to order this unit to pick up this stuff (cause unknown).
    Last edited by Rydygier; May 22 2012 at 09:37.

  4. #4
    First Lieutenant Kremator's Avatar
    Join Date
    Jun 8 2007
    Location
    Cambridge, UK
    Posts
    5,002
    Hmmm I foresee some kind of Tiberium Harvesting script (that can be defended by nasties!)

    Perhaps that would go well with your Magic scripts Ryd

  5. #5
    Master Gunnery Sergeant Rydygier's Avatar
    Join Date
    Aug 22 2011
    Location
    Poland, Pomerania
    Posts
    1,067
    Author of the Thread
    Or mana from loot, that is converted into mana energy in a special car or something... It is possible and should be quite easy. Mana harvest from anywhere into some shared pool instead of automatic regeneration is possible too. Or special static "antennas", that multiplies mana regeration rate around... Must to think. For now I'm very busy playing Arma for fun and stuff, but someday must to prepare some kind of mission/dynamic gameplay with Rincewinder...
    Last edited by Rydygier; May 22 2012 at 11:00.

  6. #6
    Quote Originally Posted by Rydygier View Post
    - units with binoculars are troublemakers, because they have a habit to use binocular often, what makes them unavailable for a long while - especially, when unit haven't any other weapon. This is however game issue (feature?)
    That's a problem with 1.60. Dwarden says it has been fixed in latest betas though I've been too snowed-under with RL stuff for the last week or two to check it.

    Thanks very much for this, having to fart around grabbing stuff while the team either get in the way or stand around idle has always irritated me.

    By the way, Ashram 1-1 has kindly posted a mag-sharing script for the player's squad to balance ammo after a firefight, which looks like it will automate another tedious task. You might like this

    http://forums.bistudio.com/showthrea...=1#post2140800

Similar Threads

  1. CfgVehicles: overriding "accuracy", "camuflage" and "sensitivity"
    By fabrizio_T in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 4
    Last Post: Apr 18 2013, 19:21
  2. Can't open base-Arma 2 missions. "Error" message claiming that it is "Read Only" up.
    By David Schofield in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 4
    Last Post: Feb 2 2012, 22:51
  3. "Spotting" script - similar to ofp "Recon" mission
    By regulator86 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 5
    Last Post: Dec 7 2011, 20:00
  4. Replies: 21
    Last Post: Sep 13 2010, 09:28
  5. Add "LAND", "Up" and "Down" actions to command menu
    By EricM in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 4
    Last Post: Jul 4 2009, 19:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •