Adding Helo to Ship via LUA (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


TheOttoman -> Adding Helo to Ship via LUA (10/25/2019 1:05:25 AM)

If I use the code

ScenEdit_AddUnit({type="ship", side="US Navy", name="FFG-49 Robert G. Bradley", dbid=726, lat=28.58694, lon=49.409, heading=270})

to create a unit, how would I assign a helo to it?




KnightHawk75 -> RE: Adding Helo to Ship via LUA (10/25/2019 7:32:37 AM)

local u1;
local u2;
u1 = ScenEdit_AddUnit({type="ship", side="US Navy", name="FFG-49 Robert G. Bradley", dbid=726, lat=28.58694, lon=49.409, heading=270});
u2 = ScenEdit_AddUnit({type="aircraft", side="US Navy", name="SmallHeloThatFits", dbid=1593, lat=28.58694, lon=49.409, heading=270,altitude=1000,loadoutid=15083});
--Put unit2 into unit1
ScenEdit_HostUnitToParent({HostedUnitNameOrID= tostring(u2.guid), SelectedHostNameOrID= tostring(u1.guid)});





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.453125