Jump to content
Sign in to follow this  
[lol]clan killer bee

Automatically artillary !

Recommended Posts

Hi guys I need some help with the following.

 

I want 3 artillery pieces that will shoot randomly to a helper ( far of the map ).

This I have seen in arma2 mission where the artillery shoot to the helper and they do get trigger ( start shooting ) by a men that follow a way point in cycle.

One of the way points has a average time.

Every time the guy gets on the way point the artillery shoots.

As I remember the the 3 were called gun 1 gun2 and gun3 and had a !alive in there so when there dead they didn't shoot anymore.

The 3 pieces where synced with eachother and the middle piece had a artillery module to it !

 

I have tried to do my best but I don't seem to get it to work in A3.

Anyone a Idea ?

 

With regards,

KillerBee

 

Share this post


Link to post
Share on other sites

Let's break down what you've got in mind:

  • When some unit (let's call it - X) arrives at a waypoint, a countdown of a random time begins until 3 artillery shots within random intervals are made?
  • Artillery hits exactly or within a radius of that WP (waypoint)?

Define better what you've got in mind.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the response,

Sorry for that english is not my native language !

 

Okay in short I want 3 pieces of artillery that shoot randomly until they are destroyed.

When destroyed they stop shooting !

 

I had a example mission in A2 got it from a mission long time ago it lookes like this

 

11ijznb.jpg

 

 

Where the guys is walking had the following

 

 

Condition:

 

alive gun1 AND alive gun2 AND alive gun3

on act:

 

[arty, getposASL artytarget, ["IMMEDIATE", "HE", 0, 18]] call BIS_ARTY_F_ExecuteTemplateMission;

 

 

The second waypoint had a min average and max time set for random shooting !

The men  (civ) had this allowDamage false

 

The artimodule was called:

 

arty

 

And the target ( helper ) was called:

 

artytarget

 

and the 3 artillary pieces where called gun1, gun2 & gun3.

 

 

Hope this is what you asked for  ?

 

 

With regards,

KillerBee

Share this post


Link to post
Share on other sites

WEll seems I have all in there what is needed name de set en de target !

In A2 I could use it look at it  in action !

You think I really only can test this in MP  ?

It has been the ofp years the last time I had a good look a scripts :rolleyes:

It does not make that much sense to me at the moment , sorry.

Share this post


Link to post
Share on other sites

Check out this video, Killerbee:

 

Btw, I remember your missions on LOL clan vanilla OFP servers. They were a lotta fun, good to see a fellow mission maker back :D

Share this post


Link to post
Share on other sites

Thank you for the replay m8.

I have seen this video before only this is to add a artillery of support too your unit players who are in game and can use it !

What Im looking for is a AI enemy that shoot to that helper and the fireinggets triggerd trough the command in the waypoint of the civilian that walks around and keeps walking over the waypoint

Sorry if you guy have miss understood me  :(  :blink: 

I have tired the to play the setting in the video and found out that atleast you need to controller otherwise the artillery module doesn't seems to work, get a whole nice load of scripting tossed at you ! <_<

Share this post


Link to post
Share on other sites

You could place triggers which activate if a unit walks through it. On trigger activation you could call this script:

0 = [artillery,yourPosition,nil,1] execVM "yourPatchToTheScript/scriptName.sqf";
/*
    Author: Revo

    Description:
    Let an artillery fire on the given position

    Parameter(s):
        0: object  - artillery vehicle
        1: array   - position of target, default [0,0,0]
        2: string  - ammunition type, if empty then random one is selected, default nil
        3: number  - number of rounds, default 5
        4: boolean - debug on/off, default false
        5: boolean - unlimited ammunition, default true
        
    Returns:
    -
*/

_artillery     = param [0,objNull];
_pos         = param [1,[0,0,0]];
_ammoClass  = param [2,nil];
_numRounds    = param [3,1];
_debug         = param [4,false];
_unlimitedAmmo = param [5,true];


//select a valid ammunition type if none was given
if (isNil "_ammoClass") then
{
    _ammoClass = selectRandom (getArtilleryAmmo [_artillery]);
};
//check if target is in range, if not, displays an error message
_inRange = _pos inRangeOfArtillery [[_artillery],_ammoClass];

if (_inRange) then
{
    _artillery doArtilleryFire [_pos,_ammoClass ,_numRounds];
}
else
{
    ["Target is not in range"] call BIS_fnc_error;
};
//display important information
if (_debug) then
{
    _eta  = _artillery getArtilleryETA [_pos,_ammoClass];
    _distance = _artillery distance2D _pos;
    hint format ["ETA: %1 seconds\nDistance %2 meters\n In Range: %3\nAmmunition Type: %4\nUnlimited Ammo: %5",_eta,_distance,_inRange,_ammoClass,_unlimitedAmmo];
};
//fills ammunition of given artillery once fired (would actually need to wait until fire mission is completed in order to completely rearm it)
if (_unlimitedAmmo) then
{
    _artillery setVehicleAmmo 1;
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×