Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Car Bomb that drives ???

  1. #1

    Car Bomb that drives ???

    I have looked but could not find the answer, Is there a way I can use the Civilan Vehicle Module with a car bomb script ? or something similar

    i.e Civvies drive around the map in there cars but if they are approx 10 feet from you they explode with a little message before so you have time to run or shoot ?

    I have seen the IED but nothing that moves in a car

    Thanks

  2. #2
    Private First Class
    Join Date
    Oct 20 2009
    Location
    Melbourne, Australia
    Posts
    34
    If it's a single car that should explode at a certain point, you can use a trigger around that area and spawn a GBU or 125 HE Shell on it ?

    Code:
    "Bo_GBU12_LGB" createVehicle getPos carbomb; (if carbomb is the name of the car that you want to explode)
    If it's a random thing you're after maybe this thread will help:

    http://forums.bistudio.com/showthread.php?t=94985
    Last edited by Wilf55; Dec 3 2010 at 10:49. Reason: Adding example

  3. #3
    Master Gunnery Sergeant 1PARA{God-Father}'s Avatar
    Join Date
    Jul 30 2010
    Posts
    1,196
    Author of the Thread
    Many thanks I did read that thread but it was not really what I wanted as then cars would be static or I would have to create waypoint for them which would not be random.

    Is there a way to use the Ambient civilian Vehicles Module and a % of them would be moving car bombs so they drive about that way that would be truly random and moving car bombs.

    Is this possible ?

  4. #4
    Sounds like you would need to create the car along with the ambient civil vec mod as to hide it. You would still have to make the way points, but you could make 5 or 6 differnt spawns and path's, and have it randomly choose one of those. I would have to look at an old edit, but you can make the script do what your talking about on prox. to yourself or an ally it would create a "shell round explosion" at the car.

  5. #5
    Another option might be this addon:
    http://forums.bistudio.com/showthread.php?t=106258

    You want version 05a (NOT the dev version 05c.)

    If I recall, you can use the homicide bomber module, and setvariable to a vehicle. You would have to spawn a driver, and give him waypoints, but he would then drive around, and the monitor script would wait until there was an enemy (which you would also designate in the editor) nearby, then it would explode.

    Just took another look at the script, and it should work. I recall testing it that way, and not having any problems with it.

    Edit:
    Oh, and to implement something like what you describe with the BI Ambient Civs, you'd have to create a custom init that would trigger a script on each spawned vehicle. Not super-hard, just a bit complicated. The script could randomly decide if that vehicle was a VBIED, and if it was, start a monitor script that ran every few seconds. If there was a Blufor (assuming that's the enemy you want), it would then give a warning or something, then create the explosion.
    Last edited by TRexian; Dec 3 2010 at 14:35.

  6. #6
    Master Gunnery Sergeant 1PARA{God-Father}'s Avatar
    Join Date
    Jul 30 2010
    Posts
    1,196
    Author of the Thread
    The Ambient civilian Vehicles and Civilian Module alos includes them driving does it not ?so they just get into a car and drive where they want, so why would I need to place cars and waypoints ?

    Or am I missing something here ?

  7. #7
    Oops, yeah - the Ambient Civ modules can be tweaked to do what you want, but it is a bit complicated.

  8. #8
    Master Gunnery Sergeant 1PARA{God-Father}'s Avatar
    Join Date
    Jul 30 2010
    Posts
    1,196
    Author of the Thread
    Would this work ?

    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", ""];
    };
    Code:
    nul=[this] execVM "carbomb.sqf";
    How can I put that in each Init of the Vehicle module , and would it work if they are moving?

  9. #9
    That would create the trigger only where the vehicle spawned - the position of _object at the time it was spawned. After that code, you might be able to move the trigger to an updated position of the vehicle, but there would be a lag.

    For the object init thing, I've used something like this before (with the ALICE init) - you could put it in the init of the SILVIE module, I believe:
    PHP Code:
    BIS_silvie_mainscope setvariable ["vehicleInit",{[_thisexecVM "carbomb.sqf";}]; 
    Notice the "_this" instead of "this" - that will refer to the object being spawned and not the module itself.

    Edit:
    Scripting like this might work better than the trigger, basically a monitor of the vehicle:
    PHP Code:
    _object _this select 0;
    _value random 100;

    if (
    _value 25then {
    _blowup false;
    while {
    alive _object} do
        {
        
    // include vehicles
            
    _targetArray nearestObjects [(getPos _bomber), ["MAN""LandVehicle"], 10];
            if ((
    count _targetArray) > 0then
            
    {
                {
                    if (
    str(side _x) == "WEST"then
                    
    {
                    
    _blowup true;
                    };
                } forEach 
    _targetArray;
            };
            if (
    _blowupthen
            
    {
            
    _boom "R_57mm_HE" createVehicle (position _object);
            }
            else
            {
            
    sleep 10;        // change to tweak wait time before checks
            
    };
        };
    }; 
    Untested, but should give the idea.

    Edit2: oh, and a private command at the top would be worthwhile, with the nested loops. :thumbs:
    Last edited by TRexian; Dec 3 2010 at 15:32.

  10. #10
    Master Gunnery Sergeant 1PARA{God-Father}'s Avatar
    Join Date
    Jul 30 2010
    Posts
    1,196
    Author of the Thread
    thanks ill give it a go and see what happens would be cool to have random cars driving around that could explode makes clearing a town or road blocks a little more risky !

Page 1 of 2 12 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
  •