OutOfComms Strike A/C at range

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

OutOfComms Strike A/C at range

Post by Parel803 »

Good afternoon,
I tried to duplicate P.Catcomb's video about the AC being out of comms on X distance during a strike mission. They go out of comms but I see a small vector like icoon staying on the screen, on there position, in there group formation. When they strike it looks like I see the results right away, as were in the video that is shown when AC come back in comms.
Tried to put as many visual settings off as possible. If someone has the time the give it a quick look that would be great. Jusy like to know if it's on my game or in the game for all.
I'm on the latest beta update.

Best regards GJ

Extra info. Later on I put a friendly radar in, should they keep track of the strike despite being out-of-comms? I get a lot of new air contact messages but no track on my screen.
I apologize that it's in the wrong forum.
Attachments
vectorIcon.zip
(184.15 KiB) Downloaded 10 times
Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: OutOfComms Strike A/C at range

Post by Parel803 »

Good afternoon, A question if I may.
I got (from the video) working:

local ac = VP_GetSide({side='Blue'}).units
local OriIffOff = VP_GetUnit({guid='P7ML9T-0HMEH3AE60GV8'})
for k,v in ipairs(ac) do
local distIff = Tool_Range(v.guid,OriIffOff.guid)
print (distIff)
if distIff > 125 then
ScenEdit_SetUnit ({guid=v.guid,OutOfComms='True'})
else
ScenEdit_SetUnit ({guid=v.guid,OutOfComms='False'})
end
end

The question is how to get 4 units (on base) instead of the side. Cannot get it working (Errors and Nil). Side is Blue, names are Viper#1 to 4.
Hope someone has some time to help me out.

best regards GJ
Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: OutOfComms Strike A/C at range

Post by Parel803 »

Sorry for inconvinience but got it workin with:

local ac ={
{name = 'Viper #1', guid = 'P7ML9T-0HMEH3AE60I4A'},
{name = 'Viper #2', guid = 'P7ML9T-0HMEH3AE60I4U'},
{name = 'Viper #3', guid = 'P7ML9T-0HMEH3AE60I5I'},
{name = 'Viper #4', guid = 'P7ML9T-0HMEH3AE60I66'}
}


local OriIffOff = VP_GetUnit({guid='P7ML9T-0HMEH3AE60GV8'})

for k,v in ipairs(ac) do
local distIff = Tool_Range(v.guid,OriIffOff.guid)
print (distIff)
if distIff > 125 then
ScenEdit_SetUnit ({guid=v.guid,OutOfComms='True'})
else
ScenEdit_SetUnit ({guid=v.guid,OutOfComms='False'})
end
end

If there is a better way then I'm glad to hear it of course.
regards GJ
Post Reply

Return to “Lua Legion”