Jump to content

Lua help please Radar pvp to screen


FreelancerAlpha

Recommended Posts

Hi does anyone  know how I can get targets  (player dynamic constructs) names and distances sent from a radar to text  listed on a screen on a static construct  ? ?   I was trying some code that someone helped with but getting script errors


 

for example 

 

on screen:


SCI Hauler 537.27meters

freelancer alpha 1.02km

 

 

is this even possible I am using a command chair as I cannot get the programming board to link with the radar pvp atmospheric size M

 

if you can help with the code that would be super appreciated 

thanks 


 

this is the code but I am  not getting the names and distances on The screen display. 

local data = radar_1.getData():gmatch('"constructId":"[0-9]*","distance":[%d%.]*')
                for v in data do
                        local id,distance = v:match('"constructId":"([0-9]*)","distance":([%d%.]*)') 

 


                        system.print(id .. " " .. distance)
                    end
```

 

 

 

Link to comment
Share on other sites

  • 4 months later...

I don't even know if you still have this issue, but well leaving here as may be useful for someone else: you can't do it with a Programming Board nor a Remote Control. You MUST use an PVP-capable controller, even a Hovercraft seat will work.

Link to comment
Share on other sites

22 hours ago, Wolfram said:

I don't even know if you still have this issue, but well leaving here as may be useful for someone else: you can't do it with a Programming Board nor a Remote Control. You MUST use an PVP-capable controller, even a Hovercraft seat will work.

That answers my question of scripting an atmosphere radar to one screen and a space radar to the other so I can have them both on one ship.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...