Parel803 -> RE: OutOfComms Strike A/C at range (1/8/2022 6:03:01 PM)
|
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
|
|
|
|