Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: random carbomb script

  1. #1

    random carbomb script

    so here is a simple car bomb script that will randomly place an ied into a car and set it off based on distance to the vehicle.

    place this into the init line of the vehicles you want to potentially have an ied planted.
    Code:
    nul=[this] execVM "carbomb.sqf";
    place this script in your mission folder;

    carbomb.sqf
    Code:
    _object = _this select 0;
    _value = random 100;
    
    if (_value < 25) then {
    	_trg=createTrigger["EmptyDetector", position _object];
    	_trg setTriggerArea[8,8,0,false];
    	_trg setTriggerActivation["WEST","PRESENT",false];
    	_trg setTriggerStatements["this", "_bomb = nearestObject [getPos (thislist select 0), 'Car']; boom = 'R_57mm_HE' createVehicle position _bomb", ""];
    };
    to increase the chances of any vehicle to have an ied planted, simply increase the integer of _value in the script.

    also props to ProfTournesol for his advice. here is the orig thread...

    http://forums.bistudio.com/showthread.php?t=94670

    cheers
    -----------------------------
    Ebolavirus' AAS mappack
    Random Car bomb script

  2. #2
    Master Gunnery Sergeant Imutep's Avatar
    Join Date
    Feb 7 2006
    Location
    Where am i ?
    Posts
    1,358
    Nice idea, will try out. Thx!

    Assault Mission Studio - German Mission Editing && Scripting Website

  3. #3

  4. #4
    In what format do you "write" a script? Word doc?...In order to place it in your missions folder? I have DL a couple scripts but I'm not sure how to create them.

  5. #5
    Quote Originally Posted by meade95 View Post
    In what format do you "write" a script? Word doc?...In order to place it in your missions folder? I have DL a couple scripts but I'm not sure how to create them.
    you can use notepad , notpad++ or chris's editor thingy.

    depending on what scripting your using its either .SQS or .SQF you save files as..

  6. #6
    I'd add some isserver checks in there if it's used in MP.

  7. #7
    Nice script. You may want to put the chance as a parameter too instead of hardcoded, eg.:
    Code:
    nul=[this, 25] execVM "carbomb.sqf";

  8. #8
    Ive been trying this for OA demo and its not working. I can do a trigger present blufor and itll go off once in area but for some reason it doesnt set off with this script. I like the probability but Id really like more randomness in my mission..

  9. #9
    Quote Originally Posted by Daimyo21 View Post
    Ive been trying this for OA demo and its not working. I can do a trigger present blufor and itll go off once in area but for some reason it doesnt set off with this script. I like the probability but Id really like more randomness in my mission..
    Same here doesn't seem to work?

  10. #10
    Heres a simple one I used in Arma2:

    To make a BOMB:
    Place an car in your mission.

    Name the car TARGET

    Then create an trigger and choose how you want to activated it, for example we'll use Radio Alpha.

    In the the trigger's Activation Field put the following:

    Code:
    BOMB = "Bo_GBU12_LGB" createVehicle getpos TARGET;
    Place the trigger somewhere you want the bomb to go off, then send your car
    into the trigger and click on the radio alpha, and BOOM!

    Theres many ways to do this,

    you can have the car as an object instead, like an IED, and have it so
    for example:

    when blufor is present in the trigger the bomb goes off _( this would be an area trigger, instead of a radio.
    Radio trigger you will use alpha , bravo, ect., Area trigger is triggered by who is present, so like blufor(USA), or Opfor(russia) ect.,

    or you can substitute a civillian, or even another faction, maybe a soldier, dont matter,
    give them the name Target, and do it that way.

    Keep in mind you dont have to have it named as Target you can name it whatever but be sure
    to change the name in the code seen above, also you can change the size of the bomb to maybe
    something smaller, youll have to get the class name for it though.
    Last edited by Günter Severloh; Aug 28 2010 at 06:19.

    Hosting Missions for Invasion-1944, Iron Front: Liberation 1944, & Hell in the Pacific

    WarMod Series - Massive Addon & Mod Customizable Compilation Mods for Arma1, Arma2, & Arma2CO
    WarMod | A2WarMod |A2WarModACE | COWarMod | COWarModACE | COWarModI44 |COSLX

Page 1 of 3 123 LastLast

Posting Permissions

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