Is there any Spring.GetVisibleUnits for radar dots?

Is there any Spring.GetVisibleUnits for radar dots?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Is there any Spring.GetVisibleUnits for radar dots?

Post by Pxtl »

I'm working on a widget and I want to just access the units that are visible on-screen. spGetVisibleUnits doesn't seem to support radar dots... Is there any way to iterate across the known radar dots, particularly the ones on the screen? Or is access to radar-dots restricted to the UnitEnteredRadar and UnitLeftRadar callins?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Is there any Spring.GetVisibleUnits for radar dots?

Post by knorke »

spGetVisibleUnits doesn't seem to support radar dots..
You mean there are not returned?
Did you try GetVisibleUnits with boolean Icons = true parameter?
No idea if that will only return icons or also return icons or something else.
Maybe Spring.GetUnitLosState usefull too.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Is there any Spring.GetVisibleUnits for radar dots?

Post by Funkencool »

Are you just trying to get a count?
That might be doable some other way but If I remember right you can't get unitID's from radar blobs. I'm guessing GetVisibleUnits won't return them since it returns unitIDs. For anti-cheating purposes no doubt.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Is there any Spring.GetVisibleUnits for radar dots?

Post by Pxtl »

I'm looking to get the coordinates and teamID of all known units on the screen, I don't require their UnitDefID.

And that's correct, GetVisibleUnits does not return anything for Radar Dots even if you elect to include Icons.
Post Reply

Return to “Lua Scripts”