Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Newbie questions on LUA scripting.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Newbie questions on LUA scripting. Page: [1]
Login
Message << Older Topic   Newer Topic >>
Newbie questions on LUA scripting. - 5/2/2020 11:16:17 PM   
Scar79

 

Posts: 183
Joined: 8/9/2013
Status: offline
Thx in advance

< Message edited by Scar79 -- 5/3/2020 12:49:50 PM >
Post #: 1
RE: Is there a way to get a sea floor depth in the give... - 5/3/2020 1:45:15 AM   
Scar79

 

Posts: 183
Joined: 8/9/2013
Status: offline
Nevermind, solved via World_GetElevation().

(in reply to Scar79)
Post #: 2
RE: Is there a way to get a sea floor depth in the give... - 5/3/2020 12:55:47 PM   
Scar79

 

Posts: 183
Joined: 8/9/2013
Status: offline
Is it possible to manipulate(destroy, for example) by the launched missile, bomb or torpedo via LUA? Thx in advance

(in reply to Scar79)
Post #: 3
RE: Is there a way to get a sea floor depth in the give... - 5/3/2020 3:38:54 PM   
Scar79

 

Posts: 183
Joined: 8/9/2013
Status: offline
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.

(in reply to Scar79)
Post #: 4
RE: Is there a way to get a sea floor depth in the give... - 5/3/2020 6:46:13 PM   
TitaniumTrout


Posts: 374
Joined: 10/20/2014
From: Michigan
Status: offline
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()



< Message edited by TitaniumTrout -- 5/3/2020 7:14:37 PM >


_____________________________


(in reply to Scar79)
Post #: 5
RE: Is there a way to get a sea floor depth in the give... - 5/4/2020 1:35:20 AM   
Scar79

 

Posts: 183
Joined: 8/9/2013
Status: offline

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!

(in reply to TitaniumTrout)
Post #: 6
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Newbie questions on LUA scripting. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.875