Lua Widget - Reclaim Area Info on M & E!
Moderator: Moderators
Lua Widget - Reclaim Area Info on M & E!
Well I acctually wanted to make this myself but I still don't get the commands in Spring. All this Widget would do is show how much M or E can be reclaimed within the area with a floating text near the center of reclaim area!
Problem was here:gunblob wrote:http: //spring.unknown-files.net/file/3414/Feature_Calculator/
No fancy stuff yet.. This widget calculate amount of metal (no energy yet) of features in specified rectangle and shows on widget.
Does anyone know how to get amount of energy in a feature?
Spring.GetFeatureResources has 5 arguments you needed to ignore the second! (first was initial metal of feature, second max metal same for E 3. and 4. but dont know what fifth is!)local fm, fe = Spring.GetFeatureResources(fid)
and second problem - M and E showed equal cause of this:local fm,_,fe = Spring.GetFeatureResources(fid)
Though your lua wasn't what I wanted. I wanted it to show when reclaim order with area was in action! But my oldest brother though me something about finding info on coding!... gl.Text("energy: " .. metalAmount, ...
... gl.Text("metal: " .. metalAmount, ...
PS. My brother found those problems in your script!
I need help on this Lua script! - http://pastebin.com/m3f602f0c
Well it works, but it takes over C++ scripts such as drawing Reclaim area and reclaim it self!!
::Feel free to modify::
Well it works, but it takes over C++ scripts such as drawing Reclaim area and reclaim it self!!
::Feel free to modify::
K I made it! (In one day acctually, not this whole time :) )
http://www.unknown-files.net/spring/378 ... laim_Info/
http://www.unknown-files.net/spring/378 ... laim_Info/
Re: Lua Widget - Reclaim Area Info on M & E!
could u modify the lua so, that it will show u m/e without press the reclaim-button
Re: Lua Widget - Reclaim Area Info on M & E!
You mean you press on a tree or other feature and drag upon it and nothing is shown(yes need a fix...) or just about having m/e shown upon enemies? (because it already works on friendlies)manolo_ wrote:could u modify the lua so, that it will show u m/e without press the reclaim-button
- Tribulexrenamed
- Posts: 775
- Joined: 22 Apr 2008, 19:06
Re: Lua Widget - Reclaim Area Info on M & E!
yeah this already exists. I have had it for years. Always check CA before requesting shit.
Re: Lua Widget - Reclaim Area Info on M & E!
and? i didnt do what i wanted, it just show the information when i press e and make that circle, when i just click a con and set him reclaim and make then the circle, it shows nothing *bäm*
Re: Lua Widget - Reclaim Area Info on M & E!
New version: - http://spring.jobjol.nl/show_file.php?id=1492
Shows the amount of metal/energy when using area reclaim.
Changes since last version:
-works within MiniMap
-you
nolonger need to have reclaim order activated to see the amount of metal in units!
-right-click area reclaim on units and
features now works the same as a normal area reclaim order!
Known bugs(not that trivial):
- does not work right in
maximized minimap
- starting area reclaim from the minimap and draging it to game world will still continue to count the
resources from the minimap. But It does not work vice-versa
Re: Lua Widget - Reclaim Area Info on M & E!
fixed issue in 0.77(Minimap issue). Uploaded to Spring Job Jol Files.
Re: Lua Widget - Reclaim Area Info on M & E!
if u come with ur mouse outside of the map the reclaim-stats (amount of what u could reclaim) drops to 0
- Attachments
-
- spring 2008-11-18 15-21-45-87_agk.rar
- videoproof
- (688.8 KiB) Downloaded 10 times
Re: Lua Widget - Reclaim Area Info on M & E!
Thanks for reporting I will try to fix that!
Re: Lua Widget - Reclaim Area Info on M & E!
np, im good at finding bugs :)
Re: Lua Widget - Reclaim Area Info on M & E!
Really? Did you use this version of the widget - http://spring.jobjol.nl/show_file.php?id=1492manolo_ wrote:np, im good at finding bugs :)
Because everything works fine for me.
Re: Lua Widget - Reclaim Area Info on M & E!
yes i used it, but it doesnt depends on going out of the map, while drag a circle, u have to come with ur mouse over the build-panel