TyphoonFr -> RE: Help with Airborne ops (6/27/2018 5:40:42 PM)
|
Hi, An LUA creation makes it possible to transform a generic unit disembarked into a specific unit, or to teleport a specific unit, to the place where the generic unit appeared. Here is an example to transform different type of unit units disembarked (Mech, Inf, Armored, Arty), s="GTIA" local cargo = ScenEdit_UnitX() local elev = World_GetElevation({latitude=cargo.latitude,longitude=cargo.longitude}) ScenEdit_DeleteUnit({s,name=cargo.name}) if cargo.dbid ==2984 then --a unit Mech Inf becomes a Mech Inf Plt (VBCI) local sgtia = ScenEdit_AddUnit({ side=s, type='Facility', dbid=2396, name='92RI', latitude=cargo.latitude, longitude=cargo.longitude}) elseif cargo.dbid ==2990 then --a unit Landed Detachment becomes a Vehicule VBL local sgtia = ScenEdit_AddUnit({ side=s, type='Facility', dbid=2200, name='3RICM', latitude=cargo.latitude, longitude=cargo.longitude}) elseif cargo.dbid ==2983 then --a unit Armored Plt Generic becomes a Armored Plt Amx-10RC local sgtia = ScenEdit_AddUnit({ side=s, type='Facility', dbid=2198, name='3RICM', latitude=cargo.latitude, longitude=cargo.longitude}) elseif cargo.dbid ==2985 then -- a unit Arty Generic becomes a Arty Bty Caésar local sgtia = ScenEdit_AddUnit({ side=s, type='Facility', dbid=2401, name='11RA', latitude=cargo.latitude, longitude=cargo.longitude}) end For example a unit Mech Inf - Generic # 2984 becomes a Mech Inf Plt (VBCI) # 2396 Instead of creating a unit, you can teleport an existing unit to the landing position of the generic unit, changing its position with ScenEdit_SetUnit (unit)
|
|
|
|