Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

EMCOM Issue

 
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 >> EMCOM Issue Page: [1]
Login
Message << Older Topic   Newer Topic >>
EMCOM Issue - 9/6/2021 6:40:28 PM   
vettim89


Posts: 3615
Joined: 7/14/2007
From: Toledo, Ohio
Status: offline
I have what I thought was a simple event that does not seem to be working

The Trigger is 'unit is detected with the specification of platform being an aircraft'

The event action is supposed to have the select SAM site activate its radars with the following code

ScenEdit_SetUnit({side='Cuba', guid='fed83872-a7b5-41ed-ace0-1e91eb1cb722', obeyEMCOM=false})
ScenEdit_SetEMCON('unit', 'fed83872-a7b5-41ed-ace0-1e91eb1cb722', 'Radar=Active')

When I run the above code the "unit obeys EMCOM" button remains checked and the radars remain off. I feel like I am missing something really simple here


_____________________________

"We have met the enemy and they are ours" - Commodore O.H. Perry
Post #: 1
RE: EMCOM Issue - 9/6/2021 11:07:10 PM   
BDukes

 

Posts: 1695
Joined: 12/27/2017
Status: offline
Mine was like this

ScenEdit_SetUnit({side='Cuba', guid='1T8G9D-0HMBHGG8ARV1L', obeyEMCOM=false})
ScenEdit_SetEMCON('Unit','SiteX','Radar=Active')

Started the game clock and the radar went active. It doesn't happen when the game isn't running.

I'd start by starting the game to see if your code works.

_____________________________

Don't call it a comeback...

(in reply to vettim89)
Post #: 2
RE: EMCOM Issue - 9/6/2021 11:19:52 PM   
vettim89


Posts: 3615
Joined: 7/14/2007
From: Toledo, Ohio
Status: offline

quote:

ORIGINAL: BDukes

Mine was like this

ScenEdit_SetUnit({side='Cuba', guid='1T8G9D-0HMBHGG8ARV1L', obeyEMCOM=false})
ScenEdit_SetEMCON('Unit','SiteX','Radar=Active')

Started the game clock and the radar went active. It doesn't happen when the game isn't running.

I'd start by starting the game to see if your code works.


thank you - you are correct I did not run the game

_____________________________

"We have met the enemy and they are ours" - Commodore O.H. Perry

(in reply to BDukes)
Post #: 3
RE: EMCOM Issue - 9/6/2021 11:34:03 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
If I follow correctly you want all the radars on right? So really you don't need the unit obey's EMCON.
  ScenEdit_SetEMCON('Unit','fed83872-a7b5-41ed-ace0-1e91eb1cb722', 'Radar=Active'); 

Now if you wanted only a specific radar sensor on the unit then you would need to turn off unit obeys emcon.
  local u = ScenEdit_GetUnit({guid='fed83872-a7b5-41ed-ace0-1e91eb1cb722'});
  u.obeyEMCON=false <-- spelling (I make the con\com mistake all the time too.
  --(now feed a singular table of what you want changed to the setter for each item you want changed.)
  u.sensors = {sensor_guid="TheguidOfTheSensorEntryToChangehere",sensor_isactive=true}; 
  u.sensors = {sensor_guid="TheguidOfTheSensorEntry#2ToChangehere",sensor_isactive=true}; --'sensor_status' is also available if needed to change.


And yes, click off the unit and back onto it in the editor to see the change if not advancing time.



< Message edited by KnightHawk75 -- 9/6/2021 11:41:49 PM >

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

1.328