[Request] Level Display Widget...

[Request] Level Display Widget...

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

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

[Request] Level Display Widget...

Post by Forboding Angel »

/me looks at bighead :-)

I need a widget for my mod that can read an FBI tag (arbitrary tag, not a tag that actually has a purpose outside of this widget), and display the contents above the units healthbar.

For example:

Level=4;

I want the number 4 to be displayed somewhere around the healthbar.

Could someone do this, pretty please? I need it somewhat badly.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

Does it have to be a FBI tag? It would probably be easier to do this with a script/lua link or pure LUA (ie, if unitname=X, draw a 4 overtop of all of them). Or just script if you wanted (although then you'd have to model a '4' onto the unit).
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

it's going to be supereasy in the next version, the whole tdf parser was rewritten in Lua.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Sadly, yes, it would need to be a FBI setting.

In a majority of my upgrades it only the weapon (more specifically, the crystal prism through which the weapon is fired).
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

I added something to 0.75b1 that should already make this easier,
the FBI customParams section. Add "key=value;" to that section,
and read them from lua using: UnitDefs[12].customParams.key
Note that both key and value are strings, there is no automatic
number conversion for values that look like numbers,
User avatar
BigHead
Posts: 145
Joined: 12 Jul 2007, 18:55

Post by BigHead »

/me needs to prepare for his java business process management presentation (work) and human resource management midterm test (university) while going to both work and school.

However with trepans new information on customParams and by borrowing some code from build eta widget (displaying text above a unit 8) ) this shouldn't take much time to complete. I can't promise you anything for next 6 days. Still there are others who might be able to help.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

hey dude, I'll take whatever I can get, whenever I can get it :P
Post Reply

Return to “Lua Scripts”