Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Lua help

 
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 >> Lua help Page: [1]
Login
Message << Older Topic   Newer Topic >>
Lua help - 6/10/2019 1:51:23 AM   
ddural

 

Posts: 21
Joined: 4/7/2011
Status: offline
I'm trying to learn this code. I am just trying to figure out how to make a radar come on at a certain time. When i try to fill in the blanks, I get a error message that says:

ScenEdit_SetEMCON 0 : ,Unable to identify EMCON subject type! Valid inputs are: Side / Mission /Group / Unit

I am trying to turn on a {name='Radar (Big Bird D [91N6])', guid='683ed749-f8d4-4874-af76-13f9924a186a'}

The side is CHINA

How do I fill in the blanks for below?


ScenEdit_SetEMCON('EMCONSubjectType', 'EMCONSubjectNameOrID', 'EMCONSettings')


Post #: 1
RE: Lua help - 6/10/2019 3:14:19 AM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
ScenEdit_SetEMCON(['Side' / 'Mission' / 'Group' / 'Unit'], ['Side Name or ID' / 'Mission Name or ID' / 'Group Name or ID' / 'Unit Name or ID'], ['Radar/Sonar/OECM=Active/Passive;' / 'Inherit'])

so I think it would be:

ScenEdit_SetEMCON('unit','Radar (Big Bird D [91N6])','Radar=Active' )

https://commandlua.github.io/index.html#ScenEdit_SetEMCON

(in reply to ddural)
Post #: 2
RE: Lua help - 6/10/2019 1:11:42 PM   
ddural

 

Posts: 21
Joined: 4/7/2011
Status: offline

I typed this: ScenEdit_SetEMCON('unit'radar, '{name='Radar (Big Bird D [91N6])', guid='88e75020-b060-4d21-af5b-2d132a37b125'}', 'Radar=active')

And I got this message: >> ScenEdit_SetEMCON('unit'radar, '{name='Radar (Big Bird D [91N6])', guid='88e75020-b060-4d21-af5b-2d132a37b125'}', 'Radar=active')

ERROR: [string "Console"]:1: ')' expected near 'radar'

(in reply to Whicker)
Post #: 3
RE: Lua help - 6/10/2019 3:39:11 PM   
Whicker

 

Posts: 664
Joined: 6/20/2018
Status: offline
did you try what I have above?
the name is not a table, just the name in quotes - no guid, no curly brackets.

(in reply to ddural)
Post #: 4
RE: Lua help - 6/10/2019 4:25:09 PM   
ddural

 

Posts: 21
Joined: 4/7/2011
Status: offline
Yes I just tried and it worked. Thank you. I will try this for a while, then i will try random on off radars. I just need to fill in the right stuff. Practice, practice.

(in reply to Whicker)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Lua help 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.906