Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

[Logged] Add Reference Point Relativity

 
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 >> Tech Support >> [Logged] Add Reference Point Relativity Page: [1]
Login
Message << Older Topic   Newer Topic >>
[Logged] Add Reference Point Relativity - 1/27/2021 7:37:16 PM   
tmoilanen

 

Posts: 72
Joined: 10/19/2011
Status: offline
Hi - I'm attempting to set a reference point's relativity via LUA script.

I am getting the following error:

"Missing unit xxxxx from relative bearing" (xxxxx substituted for the GUID.)

I suspect this is because I am trying to make the Reference Point relative to a unit of the other side, although I can manually set it in God's Eye View.

Any help would be appreciated. Script is below:

a = ScenEdit_GetUnit({name='elint'})
print(a)
myguid = a.guid
mylat = a.latitude
mylon = a.longitude
print(myguid)
print(mylat)
print(mylon)


b = ScenEdit_GetUnit({name='nimitz'})
print(b)
yourguid = b.guid
print(yourguid)

c = Tool_Bearing(myguid,yourguid)
print(c)

d = Tool_Range(myguid,yourguid)
print(d)
d = d - 240
print(d)

position = World_GetPointFromBearing({latitude=mylat,longitude=mylon,distance=d,bearing=c})
print(position)

rplon = position.longitude
print(rplon)
rplat = position.latitude
print(rplat)

if rplon > 180 then
rpvar = rplon - 180
print(rpvar)
rplon = 180 - rpvar
print(rplon)
end
if rplon < 180 then
rplon = rplon * -1
end

ScenEdit_AddReferencePoint({side='Russia',name='test1',lat=rplat,long=rplon,clear=true})
ScenEdit_SetReferencePoint({side='Russia',name='test1',bearingtype=1,relativeto=yourguid})

< Message edited by Rory Noonan -- 1/31/2021 11:58:03 PM >
Post #: 1
RE: Add Reference Point Relativity - 1/28/2021 4:06:18 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
The search is done against the same side the RP is set to, your hunch is correct,so the gui may be the only way to accomplish what you want.

(in reply to tmoilanen)
Post #: 2
RE: Add Reference Point Relativity - 1/31/2021 11:59:43 PM   
WSBot

 

Posts: 182
Joined: 1/17/2021
Status: offline
0014385

< Message edited by WSBot -- 2/1/2021 12:02:16 AM >

(in reply to KnightHawk75)
Post #: 3
RE: Add Reference Point Relativity - 2/1/2021 12:00:49 AM   
Rory Noonan

 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
Thanks for the heads-up guys, this is something we'd like to improve

_____________________________


(in reply to KnightHawk75)
Post #: 4
RE: Add Reference Point Relativity - 2/1/2021 12:21:37 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Can you supply a test save with how you are trying to do this on? So we can test exactly what you are trying to do.

_____________________________

Michael

(in reply to Rory Noonan)
Post #: 5
RE: Add Reference Point Relativity - 2/1/2021 11:35:58 PM   
tmoilanen

 

Posts: 72
Joined: 10/19/2011
Status: offline
Hi Michael - save file is attached.

I've been playing around with this for the better part of a week. I've created an event when a certain contact is detected (in this case an E-2 Hawkeye AEW.) As a result of this RP's are created relative to the contact's position, and I wanted to have them move relative to the contact (to simulate the aircraft trying to avoid flying into the radar umbrella.)

I ended up adding a secondary event that triggers hourly to adjust the location of the reference points, which works great if the contact is travelling in a straight line.

Tom

Attachment (1)

(in reply to michaelm75au)
Post #: 6
RE: Add Reference Point Relativity - 2/1/2021 11:56:24 PM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Attaching the relative RPs to the contact will cause them to jump around if the uncertainty zone starts to grow (and the actual location of the contact is lost), but I will have a look.

_____________________________

Michael

(in reply to tmoilanen)
Post #: 7
RE: Add Reference Point Relativity - 2/2/2021 1:07:25 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline

quote:

ORIGINAL: michaelm75au

Attaching the relative RPs to the contact will cause them to jump around if the uncertainty zone starts to grow (and the actual location of the contact is lost), but I will have a look.


True, though allowing a side option for the referenced guid such that I could instead of a contact say give it the actual 'other' side unit could open up some options. Yes doing it vs an enemy might be 'cheating' because your ai is acting off possible information the contact wrapper for it may not have, but that's not bad in all situations. Also thinking about about "escorting" or tailing, or otherwise staying around or in sync with some neutral, civilian or non-enemy or 3rd party side could be interesting. Cause I don't (maybe i'm wrong) think I can add one of my units as escorts to an allied or non-allied sides missions if I recall (or maybe that was just with the one-way trust version of the relation. I could think of some uses for it though, niche to be sure.
Once you find this moving train\vip car, hang back 15mi and follow it\hang around it via relativity, check ct wrapper every minute if it's AoUn is > x disengage, if not keep following it via "relativity". Food for thought maybe.

(in reply to michaelm75au)
Post #: 8
RE: Add Reference Point Relativity - 2/2/2021 4:45:44 AM   
boogabooga

 

Posts: 457
Joined: 7/18/2018
Status: offline
quote:

ORIGINAL: KnightHawk75


quote:

ORIGINAL: michaelm75au

Attaching the relative RPs to the contact will cause them to jump around if the uncertainty zone starts to grow (and the actual location of the contact is lost), but I will have a look.


True, though allowing a side option for the referenced guid such that I could instead of a contact say give it the actual 'other' side unit could open up some options. Yes doing it vs an enemy might be 'cheating' because your ai is acting off possible information the contact wrapper for it may not have, but that's not bad in all situations. Also thinking about about "escorting" or tailing, or otherwise staying around or in sync with some neutral, civilian or non-enemy or 3rd party side could be interesting. Cause I don't (maybe i'm wrong) think I can add one of my units as escorts to an allied or non-allied sides missions if I recall (or maybe that was just with the one-way trust version of the relation. I could think of some uses for it though, niche to be sure.
Once you find this moving train\vip car, hang back 15mi and follow it\hang around it via relativity, check ct wrapper every minute if it's AoUn is > x disengage, if not keep following it via "relativity". Food for thought maybe.



Another thing to consider might be adding undetectable, infinitely fueled, etc. "magic" vehicles to the database. Those would facilitate the ability to have reference points/zones move around arbitrary paths.

< Message edited by boogabooga -- 2/2/2021 4:46:31 AM >

(in reply to KnightHawk75)
Post #: 9
RE: Add Reference Point Relativity - 2/2/2021 10:36:49 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

infinitely fueled

This you can do yourself mostly along with a timer, see attached refueling script I use all the time.
You used to be able to add extra gas tanks to loadouts in cmano but that feature (or interface bug that allowed it) was removed in cmo with changes to the weapons dialog. :(

For undetectable, find a unit in the database that has no signatures, or no signatures of the type you're worried about and use that as the unit, we may need a few more generics like that (perhaps that aren't facilities) but usually I've been able to find one to fit my purpose.

Usually something that is underground like gas tanks or bunker units, but even some above ground units for instance can't be detected by radar only TV\IR and couple even with that at super close such that you need great equipment and basically have to fly almost directly over them.



Attachment (1)

< Message edited by KnightHawk75 -- 2/2/2021 10:37:51 PM >

(in reply to boogabooga)
Post #: 10
RE: Add Reference Point Relativity - 4/1/2021 11:28:07 PM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline

quote:

ORIGINAL: tmoilanen

Hi Michael - save file is attached.

I've been playing around with this for the better part of a week. I've created an event when a certain contact is detected (in this case an E-2 Hawkeye AEW.) As a result of this RP's are created relative to the contact's position, and I wanted to have them move relative to the contact (to simulate the aircraft trying to avoid flying into the radar umbrella.)

I ended up adding a secondary event that triggers hourly to adjust the location of the reference points, which works great if the contact is travelling in a straight line.

Tom


So in essence, you want to create a set of RPs on the Russia side that are visible and moving with the actual position of the AEW. So when it lands, you know the location of the carrier?


_____________________________

Michael

(in reply to tmoilanen)
Post #: 11
RE: Add Reference Point Relativity - 4/1/2021 11:56:03 PM   
thewood1

 

Posts: 6529
Joined: 11/27/2005
Status: offline
One non-cheating approach might be the RP can only be placed when the target is within a certain detection state. Maybe a percent or some other measure. If the target goes above that said state, the RP disappears and the player gets an game event warning.

I know this is only semi-related to the OP, but it would address a couple other threads that have come up very recently about keeping investigating units from getting too close and also around tailing a contact.

(in reply to michaelm75au)
Post #: 12
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> [Logged] Add Reference Point Relativity 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.953