Unit Ranges

Unit Ranges

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

Moderator: Moderators

Post Reply
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Unit Ranges

Post by user »

this thing does this:

Image

1. draws the los sphere. (light blue)
2. draws radar sphere. (green)
3. draws weapon range sphere, or cylinder, if using cylinder targeting. (red)
4. draws the hit sphere. (white)

it has a lot of chat commands to choose which spheres to draw, their render mode(lines, points, quads, polygons), and to draw for only selected units, or every unit in view.

it uses my new sphere drawing function, it allows choosing the render mode, number of subdivisions, and more.

it is good for testing stuff without having to hit 'b'.

i will release it soon.
Attachments
luaUnitRanges.jpg
(61.04 KiB) Downloaded 235 times
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Unit Ranges

Post by lurker »

Don't forget that many units with cylindrical targeting will have a height-dependent range, making it actually a cone. Or was it a truncated cone? One of the two.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: Unit Ranges

Post by user »

i thought that cylinder targetting was like, a cylinder instead of sphere,
i mean, something like the range in y axis being higher than the others.

does weaponDefs heightMod has default values?, when drawing the sphere of some units, it looks like it has.

and why does losHeight and losRadius return very low values?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Unit Ranges

Post by KDR_11k »

user wrote:and why does losHeight and losRadius return very low values?
They're in losmap texels. Don't ask me what size those are, might even vary from mod to mod.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Unit Ranges

Post by Argh »

They do differ, and LosMipLevel and AirMipLevel do not == 1 and 2 respectively, in Sensors.tdf, they'll reflect the new values, IIRC.
Post Reply

Return to “Lua Scripts”