Page 1 of 1
use LUA code to add a container to an unmanned surface vessel
Posted: Wed Mar 22, 2023 9:06 am
by hanzawa1991
Hello, I want to use LUA code to add a container to an unmanned surface vessel, and the container has anti-ship SM-6 missiles. How can I do that? I manually added various models of MK vertical launchers, but I still can’t launch missiles, and even the launchable list doesn’t have SM-6. I don’t know why.
Re: use LUA code to add a container to an unmanned surface vessel
Posted: Sun Apr 09, 2023 9:57 pm
by lumiere
Adding Mk41 (I used that of Japanese DDG Maya - #3211) using Lua is not so difficult.
Code: Select all
local guid= '87YZY5-0HMPP8EUB5UM0'
local dbid = 3211
local arc_mount = {"SMF2", "SMF1", "SMA2", "SMA1", "PMF2", "PMF1", "PMA2", "PMA1"}
for i = 1, 2 do --how many mounts you add
ScenEdit_UpdateUnit({guid=guid, mode="add_mount", dbid=dbid, arc_mount=arc_mount})
i = i+1
end
This is point: Although SM-6 is CEC-capable missile, it still requires AEGIS missile datalink to fire.
Add this datalink (AEGIS missile datalink [Two-Way] - Comm device #291) to ship, and prepare some spotter like E-2D to fire SM-6.
Code: Select all
local guid= '87YZY5-0HMPP8EUB5UM0'
local mode = "add_comms"
local dbid = 291
ScenEdit_UpdateUnit({guid=guid, mode=mode, dbid=dbid})
Give it a try