formation movement
Moderator: Moderators
formation movement
http://pastebin.com/md777a1
This is the CustomFormations widget.
Can anyone please modify it so that when air units are selected they would always move in formation(ATM this is done by pressing the right mouse button with ctrl) instead of moving regularly.
Basically switch the right click with the right click+ctrl for air units.
when you draw a line for them they shoul just move to it and on it as usual.
This is the CustomFormations widget.
Can anyone please modify it so that when air units are selected they would always move in formation(ATM this is done by pressing the right mouse button with ctrl) instead of moving regularly.
Basically switch the right click with the right click+ctrl for air units.
when you draw a line for them they shoul just move to it and on it as usual.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: formation movement
What you're asking for has nothing to do with the customformations widget, however it's very simple to do as its own widget.Gota wrote:http://pastebin.com/md777a1
This is the CustomFormations widget.
Can anyone please modify it so that when air units are selected they would always move in formation(ATM this is done by pressing the right mouse button with ctrl) instead of moving regularly.
Basically switch the right click with the right click+ctrl for air units.
when you draw a line for them they shoul just move to it and on it as usual.
I'll write it for you in exchange for the following task:
I want you to create for me 65 spring maps. The first map will have 2^0 islands (1 island). The second will have 2^1 islands (2 islands). The third will have 2^2 islands (4 islands). The fourth will have 2^3 islands (8 islands). The fifth will have 2^4 islands (16 islands). And so on until you reach a map with 2^64 islands for the greatest FFA experience ever.
Re: formation movement
I think you should ask him to double that rice grain a few more times, myself. Ooh, obscure math joke!
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: formation movement
Yay, you caught it!Argh wrote:I think you should ask him to double that rice grain a few more times, myself. Ooh, obscure math joke!
(The other joke referenced here is an exchange between OP and I that I'd write him a gadget and he'd make me a map. The gadget I made for him didn't function properly in the end and the map he made me was nothing like I asked for.)
Re: formation movement
* cough * cough * cough *

* cough * cough * cough *

* cough * cough * cough *
Re: formation movement
No be messin with ma colour scheme!
Re: formation movement
Just a note that the link to custom formations 2 in original post is terribly out of date.
But what if you wanted them to move onto that spot? To keep this functionality you would need a way to toggle between the two options, for example the control key.. Oh hey that's how it is already, problem solved."Basically switch the right click with the right click+ctrl for air units."
Re: formation movement
If you will try you will notice it is very frustrating to give multiple way point commands in the heat of battle when you have to press both shift and ctrl.Niobium wrote:Just a note that the link to custom formations 2 in original post is terribly out of date.
But what if you wanted them to move onto that spot? To keep this functionality you would need a way to toggle between the two options, for example the control key.. Oh hey that's how it is already, problem solved."Basically switch the right click with the right click+ctrl for air units."
To make it convenient i need the default one to be formation move.
Even if there is no way to switch between the 2,and the default is formation move you can always draw a tiny line instead of right clicking.
Re: formation movement
Is it that obscure? Anyway, Car, I'll make those maps if you promise you'll use them.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: formation movement
No need. I'll make this widget, it's not a bad idea.
Re: formation movement
Gota wrote:If you will try you will notice it is very frustrating to give multiple way point commands in the heat of battle when you have to press both shift and ctrl.
When have your battles been seeing any heat?
Also, shift and ctrl are right next to eachother on pretty much every keyboard layout.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: formation movement
Not sure if you wanted it to apply only if all the selected units are air, or if some of them are. This works only if they all are.
Code: Select all
function widget:GetInfo()
return {
name = "Air Formation",
desc = " v0.01 If all selected units fly, move order assigns formation by default.",
author = "CarRepairer",
date = "2009-12-01",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true
}
end
local echo = Spring.Echo
local function AllFlying()
local selectedUnits = Spring.GetSelectedUnits()
for _, unitID in ipairs(selectedUnits) do
local unitDefID = Spring.GetUnitDefID(unitID)
local ud = UnitDefs[unitDefID]
if not ud.canFly then
return false
end
end
return true
end
function widget:CommandNotify(cmdID, cmdParams, cmdOptions)
if cmdID == CMD.MOVE then
if not AllFlying() then
return false
end
local opts = {'ctrl'}
if (cmdOptions.alt) then table.insert(opts, "alt") end
if (cmdOptions.shift) then table.insert(opts, "shift") end
if (cmdOptions.right) then table.insert(opts, "right") end
Spring.GiveOrder(CMD.MOVE, cmdParams, opts)
return true
end
return false
end
Re: formation movement
Will try as soon as i get back home.thx.
Re: formation movement
Would this work fine with a large number of aircraft?by the way what if they are given a patrol command and fight command?will they move in formation?cause patrol and fight commands are used a lot with air maybe even more than move.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: formation movement
Message me on the lobby with how you want this to work exactly. It can work with whatever commands you choose.Gota wrote:Would this work fine with a large number of aircraft?by the way what if they are given a patrol command and fight command?will they move in formation?cause patrol and fight commands are used a lot with air maybe even more than move.
Re: formation movement
Ill try to catch you online but in general id like them to move in formation in as many occasions and commands as possible.