Lua help (Full Version)

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



Message


ddural -> Lua help (6/10/2019 1:51:23 AM)

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')






Whicker -> RE: Lua help (6/10/2019 3:14:19 AM)

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




ddural -> RE: Lua help (6/10/2019 1:11:42 PM)


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'




Whicker -> RE: Lua help (6/10/2019 3:39:11 PM)

did you try what I have above?
the name is not a table, just the name in quotes - no guid, no curly brackets.




ddural -> RE: Lua help (6/10/2019 4:25:09 PM)

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.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1