relativeto not working in SetReferencePoint

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
CaptainStephanie
Posts: 12
Joined: Fri Feb 10, 2023 8:07 am

relativeto not working in SetReferencePoint

Post by CaptainStephanie »

Hey, guys, I've been looking at here and find some issues:

1. when trying to rename a point, the attribute 'rename' is not working, but happens to find out 'newname' works;
2. when trying to set a point relative to a unit, I couldn't find the right way (or somewhere in this lua API is broken?) to make it work. Context is: I added a point 'RP-101' via GUI, and in the lua console I tried this:

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101',relativeto='Nimitz Carrier', bearingtype=0})
the above code did nothing, and no error pops up, then I added 'bearing' and 'distance' in the end , still no good.

Oh, one more question,
3. what does 'bearing' and 'distance' do in this function? and when should I use those attributes. Does it merely provide a shortcut for setting lat and lon?

any reply is appreciated~
thewood1
Posts: 10374
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: relativeto not working in SetReferencePoint

Post by thewood1 »

It says specifically in the documentation is bearing and distance to the relative unit if its a relative rp, i.e. "Nimitz Carrier". It should have nothing to do with lat/lon. I would suggest posting this in the lua legion subforums. It would also be helpful to have the scenario attached to validate naming, etc.
User avatar
KLAB
Posts: 509
Joined: Tue Feb 27, 2007 5:24 pm

Re: relativeto not working in SetReferencePoint

Post by KLAB »

CaptainStephanie wrote: Fri May 05, 2023 12:49 am Hey, guys, I've been looking at here and find some issues:

1. when trying to rename a point, the attribute 'rename' is not working, but happens to find out 'newname' works;
2. when trying to set a point relative to a unit, I couldn't find the right way (or somewhere in this lua API is broken?) to make it work. Context is: I added a point 'RP-101' via GUI, and in the lua console I tried this:

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101',relativeto='Nimitz Carrier', bearingtype=0})
the above code did nothing, and no error pops up, then I added 'bearing' and 'distance' in the end , still no good.

Oh, one more question,
3. what does 'bearing' and 'distance' do in this function? and when should I use those attributes. Does it merely provide a shortcut for setting lat and lon?

any reply is appreciated~
https://www.matrixgames.com/forums/view ... hp?f=10236

Your query may have already been asked/resolved but in general theres a lot of useful stuff in that subforum.
K
Post Reply

Return to “Command: Modern Operations series”