Jump to content
Sign in to follow this  
Niklas

Make MLRS fire at a fixed point after trigger is executed

Recommended Posts

Hi, i need help with a script where i can get a real MLRS controlled by AI to fire on a point multiple times after a trigger is executed, nothing fancy, can anyone help me with this? I tried many different scripts and tried my own but can't get it working.

Share this post


Link to post
Share on other sites
what's wrong with doArtilleryFire

try something like this:

_unit = MLRS_UNIT1
_targetPos = [xpos,ypos];
_shots = 20;
_unit doArtilleryFire [_targetPos, currentMagazine _unit, _shots];

While this does work, it does not play a sound, how do i fix that?

Share this post


Link to post
Share on other sites

Sadly this does not seem to change anything, still can not hear sound :(

---------- Post added at 21:36 ---------- Previous post was at 21:30 ----------

It appears that no matter what i use, the MLRS does not make a sound when fired through these command, though other artillery pieces do both with doartilleryfire and commandartilleryfire.

---------- Post added at 21:59 ---------- Previous post was at 21:36 ----------

weirdly enough sound does work with JSRS2, seems like the MLRS sound is bugged regardless if you use command/doartilleryfire

Share this post


Link to post
Share on other sites
Yes.

DoArtillaryfire shoots the round silently

http://community.bistudio.com/wiki/doArtilleryFire

"silently" means without giving a fire command over the radio, like "2, fire at that position".

The MLRS won't make a sound when firing, that's an issue with the game itself.

Copypasting my post from another thread:

artillery unit init field:

nul = [this,"Marker1"] execVM "arty.sqf";

arty.sqf:

_arty = _this select 0;
_target = _this select 1;


while {alive _arty} do {
effectiveCommander _arty commandArtilleryFire [getMarkerpos _target, currentMagazine _arty, 1];
_arty setVehicleAmmo 1;
sleep 5;
};

This will fire indefinitely on the specified marker, you can put it into as many units as you want and use as many markers as you want.

Works for all artillery units.

Adjust the sleep to your liking and delete the setVehicleAmmo command if you want them to run out of ammo.

Cheers

Edited by Grumpy Old Man

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  

×