widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE* - Page 4

widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE*

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

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

no, you can't directly control the direction, but you know the movement vector of your units, so you easily can affect their final direction.
Also you still can use the default line formation on single units to change their direction.
And yup the gathermode isn't respected, but it isn't that easy to fix, so it has to wait for 75b3 (sorry).
And convex hull is very interesting (perhaps + a nearest unit detection, to minimize the movement distance). I will test how fast it is.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Post by ginekolog »

i found a bug: i can't draw formations on minimap or even altclick on minimap (which i like to do)
Otherwise good stuff.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Hmm, for me I can use the old line formations on the minimap, but not the widget. Using dual screen with minimap on the left.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Post by ginekolog »

feature request/bug: When i have selected 3 diff unit types and draw formation, this widget will sort units by name along the line. This is unhandy as i would much more preffer random mix than groupings.

Lets say i have 5 golis 10 reapres and 10 samson. Widget would group units tohether leaving weak sams grouped together. Is random mix possible?
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by ginekolog »

bug in 076:

select 2 units, right click on minimap (be near cener of map) and units wont got to minimapspot but to realmap spot.
This makes this awsome widget useless for me.

This issue was fixed be4 but in 76 i got it again. Ideas?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by jK »

its not possible to recieve Minimap clicks within LuaUI, so it is impossible to fix any minimap issues.

Btw do you use IceUI?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by trepan »

Either jK is lying, mistaken, too lazy to check; or this doesn't work.
IIRC, I've even discussed this 'feature' with him in the past.


NOTE: middle mouse clicks are not captured

Code: Select all

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
--  file:    minimap_click.lua
--  brief:   eat minimap clicks
--  author:  Dave Rodgers
--
--  Copyright (C) 2007.
--  Licensed under the terms of the GNU GPL, v2 or later.
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

function widget:GetInfo()
  return {
    name      = "MinimapClick",
    desc      = "MinimapClick",
    author    = "trepan",
    date      = "Jan 05, 2008",
    license   = "GNU GPL, v2 or later",
    layer     = 0,
    enabled   = true  --  loaded by default?
  }
end

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

function widget:MousePress(x, y, button)
  if (button < 0) then
    Spring.Echo("CLICK", x, y, button)
    return true -- eat minimap clicks
  end
  return false
end

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by jK »

You said it isn't possible, except I would use SlaveMiniMap().
But yeah, it seems that LuaUI receives the MousePresses before the engine minimap-handler :mrgreen:
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by LordMatt »

Could you make the widget work on the minimap? As a dual screen user I could definitely use it. :-)
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by ginekolog »

jK wrote:its not possible to recieve Minimap clicks within LuaUI, so it is impossible to fix any minimap issues.

Btw do you use IceUI?
not using ice. And this WORKS for 1 unit, it only fails with more units so it should be correctable. gl
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by NOiZE »

plz fix this :)
Lefty
Posts: 27
Joined: 26 Jun 2007, 22:00

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by Lefty »

Hi !
Do you plan some support for multi-units formations ? Because this widget is good for a line of same units, but less usable for several types of units (hide artillery behind bulldogs and so). Maybe its possible to do the same using groups (and guard command), but it requires micromanagement.
Btw it would be nice too if units can be sorted in lines (preferably sorted by type - tanks in the front and so) and not so crowded in one short line.
But anyway - nice work ! :-)
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by ginekolog »

ginekolog wrote:bug in 076:

select 2 units, right click on minimap (be near cener of map) and units wont got to minimapspot but to realmap spot.
This makes this awsome widget useless for me.

This issue was fixed be4 but in 76 i got it again. Ideas?
Is this perhaps fixed yet?
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Re: widget: CustomFormations v2.1 (updated 4 Jan)

Post by NOiZE »

ginekolog wrote:
ginekolog wrote:bug in 076:

select 2 units, right click on minimap (be near cener of map) and units wont got to minimapspot but to realmap spot.
This makes this awsome widget useless for me.

This issue was fixed be4 but in 76 i got it again. Ideas?
Is this perhaps fixed yet?

jK fixed that i will include the new widget with BA again, but for now you can get it out of CA i guess.
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE*

Post by ginekolog »

i can confirm that this widget works great again. Minimap works and it even randomizes units at destination. Great, thanx.

Ps. I pulled it out of CA but guess the one on first page should be ok too.
Post Reply

Return to “Lua Scripts”