Lua Adding Mounts (Full Version)

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



Message


Kushan04 -> Lua Adding Mounts (11/26/2020 5:57:48 AM)

I'm trying to add mounts to units via Lua. In this test I was trying to add another M1A2 SEP Abrams mount to an existing armored unit.

>> ScenEdit_UpdateUnit({guid='P40YQP-0HM4HQ52CI28L',mode='add_mount',dbid=2883})

BUT Its kicking back an error:

ScenEdit_UpdateUnit 0 : ,No targeting arcs supplied for mount M1A2 SEP Abrams Main Battle Tank

I've tried all the arc settings from ScenEdit_UpdateUnit. Anyone have an idea what I'm doing wrong? I'm sure its something simple and right in front of my face.




michaelm75au -> RE: Lua Adding Mounts (11/26/2020 7:01:11 AM)

A mount requires an arc; same as if you added thru the editor.

local arc360 = {'360'}
local ok = ScenEdit_UpdateUnit({guid='P40YQP-0HM4HQ52CI28L',mode='add_mount',dbid=2883,arc_mount=arc360})
print(ok)




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.6386719