   #%%%%  #%%              #%%%%%          #%%%%%%%%%%   
  #%%###   #%%              #%/ ####\%%      ###### #%%######    
  #%%%%   #%%            #%/           \%%                   #%%        
  #%%###   #%%           #%%%%%%%%                 #%%        
  #%%         #%%          #%%########%%               #%%    
  #%%         #%%%%   #%%                 #%%            #%%                                
  #%%         #%%%%  #%%                   #%%           #%%       
 #####        ########  ####                     ####          #####        



Description:
This is a car bomb script which means that it blows up cars at certain speeds and conditions. Please read further down to see what the script can do and how to use it.


Usage:
Put this script in your mission folder, usually:
Code:
X:\Documents and Settings\username\My Documents\ArmA\missions\mission name


Type this into init line of a unit:
Code:
[name of object, at what speed activated, mode, explosive] exec "carbombv1.2.sqs"

example:
[car, 30, 0, "R_Hydra_HE"] exec "carbombv1.2.sqs"

You may also combine 2 modes (not tested with more)
Example:
[car, 30, 0, "R_Hydra_HE"] exec "carbombv1.2.sqs"; [car, 50, 5, "R_Hydra_HE", truck1] exec "carbombv1.2.sqs"
Car can't go below 30 once it has reached 30 and if it goes 50 meters away from truck1 it will blow up.
Works with objects too.


      Explosives:
      tested with these:
      Code:
      "R_Hydra_HE", "Bo_GBU12_LGB", "Sh_125_SABOT", "Sh_120_SABOT"; "M_Hellfire_AT",
      "M_Ch29_AT", "Sh_122_HE"
       Recommended:
      "R_Hydra_HE", "M_Hellfire_AT", "Sh_120_SABOT", "Sh_125_SABOT", "M_Ch29_AT",


      Modes:
      There are different modes, where we choose the mode we type in different numbers for different functions.
            
            Mode 0:
            If you type 0 into the mode argument then once the speed you have chosen is reached if you go below that speed the car will explode.
            Example:
            [car1, 20, 0, "R_Hydra_HE"] exec "carbombv1.2.sqs"
            car1 will blow up with a Hydra AT missile explosion once it is over 20 and brakes down to below 20


            Mode 1:
            If you type 1 into the mode argument then once chosen speed has been reached the car will blow up.
            Example:
            [truckwest, 50, 1, "M_Hellfire_AT"] exec "carbomb.sqsv1.2"
            Once truckwest reaches 50 KM/h it will blow up with a Hellfire AT missile explosion.


            Mode 2:
            If you have written 2 into the mode argument then once you have reached pre chosen speed you can't go slower than it or car will blow and in addition you cant go to fast either or              else the car will also blow up.
            Example:
            [heli1, 70, 2, "Sh_120_SABOT", 140] exec "carbombv1.2.sqs"
            Once heli1 has reached 70 and brakes down under 70 or goes over 140KM/h it will explode with a M1A1 main gun explosion.


            Mode 3:
            If you have written 3 into the mode argument then when you turn on the engine it will blow up after pre chosen amount of seconds. NOTE: It will blow even if engine is turned off.
            Example:
            [M1A1, 5, 3, "Sh_125_SABOT"] exec "carbombv1.2.sqs"
            If the engine of this M1A1 is turned on it will blow after 5 seconds with a T72 main gun explosion regardless if you turn the engine off.


            Mode 4:
            If you have written 3 into the mode argument then when you turn on the engine it will blow up after pre chosen amount of seconds but will reset timer if engine is turned off.
            Example:
            [BMP, 5, 3, "Sh_120_SABOT"] exec "carbombv1.2.sqs"
            If the engine of this BMP is turned on it will blow after 5 seconds with a M1A1 main gun explosion unless you turn of the engine.
            
            Mode 5:
            If you have written 5 into the mode argument then once a unit comes nearer than X meters then it will blow up.
            Example:
            [BMP, 30, 5, "Sh_120_SABOT", carone] exec "carbombv1.2.sqs"
            In the example the vehicle called BMP will blow up with a M1A1 main gun explosion once it is 30 meters away from carone.

            Mode 6:
            If you have written 6 into the mode argument then once a unit enters the vehicle it will blow up after X seconds.
            Example:
            [truck1, 30, 5, "Sh_125_SABOT"] exec "carbombv1.2.sqs"
            In the example the vehicle called truck1 will blow up  after 30 seconds with a T72 main gun if a unit enters the vehicle as driver.

            Mode 7:
            If you have written 7 into the mode argument then once a unit enters the vehicle it will blow up after X seconds unless the unit exits before X seconds have passed. This resets the timer.
            Example:
            [johnwayne, 30, 5, "M_Hellfire_AT"] exec "carbombv1.2.sqs"
            In the example the vehicle called johnwayne will blow up with a Hellfire explosion once it has a driver and 30 seconds have passed unless you exit the vehicle which will reset the timer

Note:
Please note that this has not been tested in MP or on aircrafts.

Version:
v1.2
Added mode 5
Added mode 6
Added mode 7

v1.1
Fixed explosion In mode 0, 1and 2.
Optimized for better performance

v1.0
- Initial release


Disclaimer:
This is NOT anything official, use at your OWN risk.


Credits and thanks
Thanks to www.armaholic.com and www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi
Extra big thanks to Foxhound.
