Results 1 to 6 of 6

Thread: Detect artillery capable vehicles

  1. #1

    Detect artillery capable vehicles

    hi
    Is there a way to detect if vehicle is artillery vehicle? (other than using lists of vehicle types with isKindOf command.)

  2. #2
    This is the function I created for my AI FO addon. If the result is 1 it is an artillery piece. I haven't found an instance "yet" where it didn't yield the correct result.

    Code:
    _Fnc_Is_Vehicle_Arty =
    
    {
    
    	_Veh = _this select 0;
    
    	_result = 0;
    
    	if (isNumber (configFile >> "CfgVehicles" >> _Veh >> "artilleryScanner")) then
    
    	{
    
    		_result = getNumber (configFile >> "CfgVehicles" >> _Veh >> "artilleryScanner");
    
    	};
    
    	_result
    
    };
    Hope this helps
    Blake

  3. #3
    that seems great thx. now if it were possible to detect between transport helos/planes and attack helos/planes that would be perfect. isKindOf isn't very usefull for this.

  4. #4
    Quote Originally Posted by gc8 View Post
    that seems great thx. now if it were possible to detect between transport helos/planes and attack helos/planes that would be perfect. isKindOf isn't very usefull for this.
    CfgVehicles has for all air vehicles cargoCompartment entries. For several cargo-capable machines (UH-1, Mi-24, C-130)

    driverCompartments="Compartment1";
    cargoCompartments[]={"Compartment2"};

    You'll need to check, but if the presence of "Compartment2" is restricted to cargo-capable aircraft you could modify blakeace's code appropriately.

    Another possibility would be to use "transportSoldier" - returns the number of cargo seats. If 0, it's an attack machine.

    edit - should have said

    Another possibility would be to look for "transportSoldier" - contains the number of cargo seats. If 0, it's an attack machine.
    Last edited by Orcinus; May 3 2012 at 22:10.

  5. #5
    thx I found out that this works as well:
    Code:
    getNumber (configFile >> "CfgVehicles" >> _veh >> "transportSoldier")

  6. #6
    Fine

    Ofc some aircraft will be both cargo-capable & attack capable - for example, an Mi-24V or an Mi-8 (rockets) can do a lot of damage as well as carry troops. Depends what you want to do with your script. If you want to try somehow directing AA fire at attack machines, cargo capacity would be a very poor discriminator.

Similar Threads

  1. Detect HE round point of impact (detect explosion)
    By Zodd in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 2
    Last Post: Apr 12 2012, 22:33
  2. Vehicles move choppy. AI not capable of driving smooth?
    By cheesus182 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: Aug 21 2011, 15:51
  3. Artillery Module on costum vehicles
    By Takko in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 7
    Last Post: Nov 6 2010, 14:01
  4. Any Laptops that are capable of Running ARMA2:OA, Know of any?
    By Simpledestruction in forum ARMA 2 & OA - GENERAL
    Replies: 25
    Last Post: Oct 30 2010, 02:28
  5. Ho to detect if there are no more vehicles alive
    By seba1985 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 24
    Last Post: Sep 28 2006, 00:35

Posting Permissions

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