Jump to content
Ulfgaar

MK41 VLS Cruise missile - reliability problems.

Recommended Posts

Just to place this into context - i made a mission where the players will be supported by some cruise missile fire, fired by the AI. There are 3 different targets, and 3 different MK41 VLS launch pads firing at each their target.

I found this script/code and its been working very "on/off". It works every time in singleplayer, but only "occational" in multiplayer on a dedicated server - so im approachig you guys, the mighty Arma 3 oracle, to see if you guys can help me improve this code so that it'll work more predictably and reliably on dedicated servers too. 

This is the code im using:
 

------------------------------------------------
// This is the script I'm using in an .sqf
------------------------------------------------

west reportRemoteTarget [HAA1_0, 3000];
HAA1_0 confirmSensorTarget [west, true];
west reportRemoteTarget [T2, 3000];
T2 confirmSensorTarget [west, true];
west reportRemoteTarget [T1, 3000];
T1 confirmSensorTarget [west, true];
Cruise1 fireAtTarget [HAA1_0, "weapon_vls_01"];
Cruise2 fireAtTarget [T2, "weapon_vls_01"];
Cruise3 fireAtTarget [T1, "weapon_vls_01"];

------------------------------------------------
// This is basically the information provided for each launcher
------------------------------------------------

west reportRemoteTarget [HAA1_0, 3000];
HAA1_0 confirmSensorTarget [west, true];
Cruise1 fireAtTarget [HAA1_0, "weapon_vls_01"];

While developing the mission, i do my fair share of testing on a dedicated server - first time i tried it, all 3 missiles fires and hits their targets. Next time i did some changes to the mission, although nothing to the settings of the targets/missiles or script - suddenly all 3 missiles fires, but 1 goes straight up - while 2 hit their target. And ofc, during the offical playthrough of the mission with my Arma 3 group, all 3 missiles fires but all 3 goes straight up and none of them seemingly targeting their targets. This was mildly put rather annoying.

So in short, if any of you script-wizzes know how to help me out with this to have it work more predictably and reliably on a dedicated server it would be absolutely epic, and much appreciated.

Share this post


Link to post
Share on other sites

Could you precise what are HAA1_0, T1,T2, cruise1,cruise2, cruise3, your world, your mods, from where, when you fire these codes?

  • Like 1

Share this post


Link to post
Share on other sites

First off, i had a brainfart writing the first post - what im talking about is not "ASL" (i've edited it now) - but the MK41 VLS cruise missile launcher that were introduced with the vanilla destroyer. My appologies for that.

Map: NOGOVA, from "CUP Terrains - CWA".

HAA1_0 = CSAT Tigris (Vanilla)
T1 = CSAT Otokar Arma APC (Vanilla)
T2 = CSAT Otokar Arma APC (Vanilla)

Cruise1 = MK41 VLS Launcher on the front deck of destroyer 1 (Vanilla)
Cruise2 = MK41 VLS Launcher on the front deck of destroyer 2 (Vanilla)
Cruise3 = MK41 VLS Launcher on the front deck of destroyer 3 (Vanilla)

The script is activated by a trigger firing the designated .sqf file with the above mentioned script, activated by anyplayer entering it:

execVM "CM1.sqf";


This is the modlist we're using - however none of the involved parts are from any mods, but from the vanilla game (and belonging DLC's).


SPAR - Core Mods

As said, it has worked'ish before when testing the mission on the dedicated server - but just not reliably, and unfortunatly on the actual playthrough of the mission with the group they just fired straight up - with no apparent intent of flying towards their designated target.

Share this post


Link to post
Share on other sites

Just a point, waiting also for a better answer:
You execVM an sqf with fireAtTarget. As you can read at this link (2nd note), the fireAtTarget seems to wait until target is identified (aimedAtTarget returns > 0)

You should follow this example, not saying it a 100% solution.

 

Share this post


Link to post
Share on other sites

Small update, incase others are wondering.

I took what PierreMGI showed me and ended up making the .sqf script look like this in a different mission. This works on a dedicated server, and all 3 cruise missiles are fired and all 3 hit their targets. The sleep code is just there for some "effects" with them being fired in sequence, rather than all at once.

Variable names are:
VLS1, VLS2, VLS3 = The VLS Cruise missile launchers, 3 different.
AA1, AA4, AA5 = 3 different targets i want destroyed.
 

west reportRemoteTarget [AA1, 3600];
west reportRemoteTarget [AA4, 3600];
west reportRemoteTarget [AA5, 3600];
VLS1 doWatch AA1;
waitUntil {AA1 confirmSensorTarget [west, true]; VLS1 aimedAtTarget [AA1] > 0}; VLS1 fireAtTarget [AA1, "weapon_vls_01"];
Sleep 5;
VLS2 doWatch AA5;
waitUntil {AA5 confirmSensorTarget [west, true]; VLS2 aimedAtTarget [AA5] > 0}; VLS2 fireAtTarget [AA5, "weapon_vls_01"];
Sleep 5;
VLS3 doWatch AA4;
waitUntil {AA4 confirmSensorTarget [west, true]; VLS3 aimedAtTarget [AA4] > 0}; VLS3 fireAtTarget [AA4, "weapon_vls_01"];


This might not be perfect, but it works - and is tested and verified on the dedicated server of my Arma 3 group. 

Links to relevant content:
- FireAtTarget
- ReportRemoteTarget
- ConfirmSensorTarget
- AimedAtTarget
- DoWatch
- WaitUntil


Pretty neat and immersive to have the players go onto the deck of the aircraft carrier heading for their transport helicopters, while the surrounding escort destroyers fire their cruise missiles during dawn/dark 😉.

  • Like 2

Share this post


Link to post
Share on other sites

Interesting, I just attach a laser to the target, and it seems to work well, but I've only tested in singleplayer. 

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

×