[1307.14] SetReferencePoint Lua Issue

Post bug reports and ask for game support here.

Moderator: MOD_Command

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

[1307.14] SetReferencePoint Lua Issue

Post by CaptainStephanie »

reposting...

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

1. when trying to rename a point, the attribute 'rename' is not working, but happen to find out 'newname' works, so probably need to update the doc.
2. after manually adding a rp on the map, its bearingtype is 'Fixed', but there's no relative unit, so this 'Fixed' might get people confused, different from the one in 'Fixed or Rotating'.
3. there are three effects that I couldn't achive from console with Lua, namely,
a.manually add a rp on the map, I want to make it relative to a unit, say 'Nimitz Carrier'

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101',relativeto='Nimitz Carrier', bearingtype=0})
is not working
b.manually add a rp on the map, set it Fixed to Nimitz Carrier, now I want to make it Rotating to that Nimitz Carrier[vice versa, from Rotating to Fixed]

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101', bearingtype=1})
is not working

Oh, one more question,
4. 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?
User avatar
michaelm75au
Posts: 12467
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: [1307.14] SetReferencePoint Lua Issue

Post by michaelm75au »

I will have a look at it.

The bearing and distance is used by the 'relative to' part.
a) bearing is (0-360) Bearing from the 'relative' unit
b) distance is distance from the 'relative' unit

Code: Select all

ScenEdit_AddReferencePoint( {side='sidea', RelativeTo='USN Dewey', bearing=45, distance=20, COLOR='yellow'} )
The RP is added off 45 degrees (say NE) and 20 NM from the location of 'USN Dewey'.
Michael
User avatar
michaelm75au
Posts: 12467
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: [1307.14] SetReferencePoint Lua Issue

Post by michaelm75au »

CaptainStephanie wrote: Sun May 28, 2023 1:50 am
3. there are three effects that I couldn't achive from console with Lua, namely,
a.manually add a rp on the map, I want to make it relative to a unit, say 'Nimitz Carrier'

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101',relativeto='Nimitz Carrier', bearingtype=0})
is not working.
You have not given it any details as to where the RP is relative to the unit as in

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101',relativeto='Nimitz Carrier', bearingtype=0, bearing=45, distance=10})
Adds the RP relative to Nimitz at distance of 10 NM NE of it.

b.manually add a rp on the map, set it Fixed to Nimitz Carrier, now I want to make it Rotating to that Nimitz Carrier[vice versa, from Rotating to Fixed]

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101', bearingtype=1})
is not working
Weird one. It only works if it contains the keyword 'highlighted' as in

Code: Select all

ScenEdit_SetReferencePoint({side='blue',name='RP-101', bearingtype=1, HIGHLIGHTED=true}) 
.
This is not required so will remove that funny condition; can't see why it is there as I was one who added it.
Michael
User avatar
michaelm75au
Posts: 12467
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: [1307.14] SetReferencePoint Lua Issue

Post by michaelm75au »

3b corrected for future build (1307.18)
Michael
Post Reply

Return to “Tech Support”