Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Get/Set a Units WCS for Land/Surface etc

 
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 >> Get/Set a Units WCS for Land/Surface etc Page: [1]
Login
Message << Older Topic   Newer Topic >>
Get/Set a Units WCS for Land/Surface etc - 8/3/2019 4:36:39 AM   
Whicker

 

Posts: 635
Joined: 6/20/2018
Status: offline
I am trying to set the WCS for Surface targets of a sub. It looks like it is not working correctly - the value it returns is some sort of illegal character?

If I set a unit equal to u - this was a sub, and then try to print out the value of `holdfire` which should return the WCS I get:
print(u.holdfire)
{ Subsurface = '', Surface = '', Land = '', Air = '' }

Both Surface and Land are set to HOLD, the other 2 are FREE.

When I try to set them nothing works - I can't tell if I am doing it wrong or if there is an issue. I have not really found an example of how to do it, but now that I see it isn't returning a legit value I think there is something wrong other than my guesses at how to do it.

It does work if they are all set to inherit - well any set to inherit return inherit:
local u = SE_GetUnit({name='PL-636.3 Kilo [Varshavyanka]', guid='c4832988-3ccd-49b2-a23c-12141819809e'})
print(u.holdfire)
{ SubSurface = 'Inherit', Surface = 'Inherit', Land = 'Inherit', Air = 'Inherit' }

just Air set to FREE:
local u = SE_GetUnit({name='400TZ #5', guid='6b8fd2f7-4f32-4bb9-a72f-ce3c453786f9'})
print(u.holdfire)
{ SubSurface = 'Inherit', Surface = 'Inherit', Land = 'Inherit', Air = '' }

Seems to be a little different on groups, sometimes I get ' ' as a value.

I think the values returned should be:
Free(0), Tight(1), Hold(2)
Post #: 1
RE: Get/Set a Units WCS for Land/Surface etc - 8/3/2019 4:49:17 AM   
Whicker

 

Posts: 635
Joined: 6/20/2018
Status: offline
hmmmm Free(0), Tight(1), Hold(2) can't quite be correct, where is inherit?

and if I do it with GetDoctrine:

local d =ScenEdit_GetDoctrine({name='PLARK-670 Charlie I [Skat] ', guid='053361b2-0ccc-467e-bee5-53edcb651f82'})
print(d)

{ weapon_control_status_air = '', maintain_standoff = '', weapon_control_status_surface = '', weapon_control_status_land = '', use_refuel_unrep = '', weapon_control_status_subsurface = '', ignore_plotted_course = '' }

I can't seem to get anything to work with GetDoctrine. Kinda seems like I am doing it wrong but I have tried a couple examples with no luck.

(in reply to Whicker)
Post #: 2
RE: Get/Set a Units WCS for Land/Surface etc - 8/4/2019 5:04:40 AM   
Whicker

 

Posts: 635
Joined: 6/20/2018
Status: offline
I can set this now no problem:
local u = ScenEdit_SetDoctrine({name='CG 68 Anzio [Ticonderoga Baseline 4, VLS]', guid='e6525e73-ad4b-47dd-9086-7f652c67b2a4'},{weapon_control_status_subsurface=0})

but if I try to read it (GetDoctrine) that is when it gives the odd character.

Setting it is all I need so I'm all set, but it I think the Get method may have a problem.

(in reply to Whicker)
Post #: 3
RE: Get/Set a Units WCS for Land/Surface etc - 8/4/2019 6:26:03 AM   
michaelm75au


Posts: 12511
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
I'll take a look. Do you have a save of what you were using so I can play around with the WRA you have tried?

_____________________________

Michael

(in reply to Whicker)
Post #: 4
RE: Get/Set a Units WCS for Land/Surface etc - 8/4/2019 9:57:24 PM   
Whicker

 

Posts: 635
Joined: 6/20/2018
Status: offline
sure, here is a simple one. I posted the lua code in the description so when that comes up copy it and run it in the console.

Attachment (1)

(in reply to michaelm75au)
Post #: 5
RE: Get/Set a Units WCS for Land/Surface etc - 8/23/2019 7:46:02 AM   
michaelm75au


Posts: 12511
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
I can see the issue. It shows the correct values when I run the 'debug' version, but not for the real version which is showing a 'binary/hex' value.
The table will contains the numeric values as strings in future

< Message edited by michaelm75au -- 8/24/2019 1:40:40 AM >


_____________________________

Michael

(in reply to Whicker)
Post #: 6
RE: Get/Set a Units WCS for Land/Surface etc - 8/25/2019 1:08:47 AM   
michaelm75au


Posts: 12511
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
Also adding option (actual=true) to show the inherited values so you can see all the doctrine applicable to the object being looked at. That should give more flexibility to tuning the object.
Trying to work back to the 'parent' object thru Lua seems difficult.

_____________________________

Michael

(in reply to michaelm75au)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> Get/Set a Units WCS for Land/Surface etc 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.109