Height Detection in Spring
Moderator: Moderators
-
- Posts: 6
- Joined: 20 Apr 2007, 06:38
Alright so maybe height detection is bad form, and there is easier/better ways to do it in spring... but for the first version of Devolution in spring i don't mind if the scripts aren't super clean. I want to attempt just to bring what I did in TA into Spring, and apparently to do that I need to remeasure heights. I tried throwing zwzsg's caliper into my mod to do that, but I quickly realized that it needs the custom number textures included in the caliper.ufo file. How do I add textures from a gaf file into spring?
Man, I'm sure there's a way to spit out a unit's height to LUA or something... in s3o format you specify the unit's height so it's a non-issue in there... hmmmm
I'm not very LUA savy but there should be like a:
UnitDefs[216]["height"] property that could be read by a script... and script something simple like:
Excepts the whole LUA interface is documented in such a way that I am completely baffled by it so what I have suggested is comletely wrong... maybe someone like trepan can fix it.
I'm not very LUA savy but there should be like a:
UnitDefs[216]["height"] property that could be read by a script... and script something simple like:
Code: Select all
local color = { 1.0, 1.0, 1.0 }
local theheight = "None Selected"
function UnitSelected(unitID, unitDefID, teamID)
gl.Color(color)
theheight = ("UnitCreated: id=" .. unitID .. " Name: " UnitDefs[unitID]["model"]["name"]" .. " Height: " UnitDefs[unitID]["height"])
gl.Text(theheight, 500, 500, size, format)
end
http://spring.clan-sy.com/phpbb/viewtopic.php?t=9934 a simple way to find unit heights ingame. in pure BOS.