Newbie questions on LUA scripting. (Full Version)

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



Message


Scar79 -> Newbie questions on LUA scripting. (5/2/2020 11:16:17 PM)

Thx in advance




Scar79 -> RE: Is there a way to get a sea floor depth in the given coords? (5/3/2020 1:45:15 AM)

Nevermind, solved via World_GetElevation().




Scar79 -> RE: Is there a way to get a sea floor depth in the given coords? (5/3/2020 12:55:47 PM)

Is it possible to manipulate(destroy, for example) by the launched missile, bomb or torpedo via LUA? Thx in advance




Scar79 -> RE: Is there a way to get a sea floor depth in the given coords? (5/3/2020 3:38:54 PM)

Please, help, i can't figure out where's the problem: What's wrong with this peice of code?!

quote:

local mission=ScenEdit_AddMission('Targets','Surface Target Patrol','patrol',{type='sea'},{zone={'STZ_01','STZ_02','STZ_03','STZ_04'}})
ScenEdit_AssignUnitToMission("Surface Target","Surface Target Patrol")


If i delete {type='sea'} and change mission-class to Support, it works just fine. Obviosly, there is some problem with mission subtype determination, but i can't understand what exactly is wrong.




TitaniumTrout -> RE: Is there a way to get a sea floor depth in the given coords? (5/3/2020 6:46:13 PM)

local mission2 = ScenEdit_AddMission('OPFOR','Merchant05A', 'patrol', {type='sea', zone={'RP-1', 'RP-2', 'RP-3'}})

You need to define the zone inside the same set of braces as the type.

<strike>You should be able to destroy a weapon via Lua using .delete .</strike>

local weaponTest = ScenEdit_GetUnit{guid='demuu8-0hlvfim46334n'}

weaponTest:delete()





Scar79 -> RE: Is there a way to get a sea floor depth in the given coords? (5/4/2020 1:35:20 AM)


quote:

ORIGINAL: TitaniumTrout

local mission2 = ScenEdit_AddMission('OPFOR','Merchant05A', 'patrol', {type='sea', zone={'RP-1', 'RP-2', 'RP-3'}})

You need to define the zone inside the same set of braces as the type.

<strike>You should be able to destroy a weapon via Lua using .delete .</strike>

local weaponTest = ScenEdit_GetUnit{guid='demuu8-0hlvfim46334n'}

weaponTest:delete()



quote:

local mission2 = ScenEdit_AddMission('OPFOR','Merchant05A', 'patrol', {type='sea', zone={'RP-1', 'RP-2', 'RP-3'}})

You need to define the zone inside the same set of braces as the type.

Thank you very much, TitaniumTrout! It works now!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.65625