Waypoint Dragging Widget

Waypoint Dragging Widget

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

Moderator: Moderators

Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Waypoint Dragging Widget

Post by Kloot »

Small LuaUI widget, lets you drag unit waypoints SupCom-style.

http://www.darkstars.co.uk/downloads/vi ... 2.lua&dl=1
Last edited by Kloot on 14 Aug 2009, 00:41, edited 4 times in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

a bug.

Also:

I have my cmdcolors.txt setup to show command queues for all selected units. could your widget detect this and adjust?
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Stolen from supcom -___-

Well, at least a lot of people will like it ^___^

Spring shall eat supcom!
vital
Posts: 17
Joined: 08 Jun 2007, 12:40

Post by vital »

:-) thank you, you fill my request faster than lightning!!
--> go test it right now !

(this idea could be 'stolen' from red alert 2 also ;-) )
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Nice! Can you also add a way to add things as the next item in the queue, without destroying the rest of the queue?
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

hold alt when you add somthing to a cue and it inserts in in the front in a factory. could insert the same thing for waypoints maybe?
Tim-the-maniac
Posts: 250
Joined: 22 Jul 2006, 19:58

Post by Tim-the-maniac »

nice widget.
would be nice if you could drag mulitple commands at once so if you had a load of fighters on patrol you could select them all and drag all their waypoints together.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Post by Satirik »

if you want it to be perfect you need to add buildings drag n drop too :)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

@AF

The widget can't access your cmdcolor options, but I've added a boolean that lets it act as if it can (noShift, see the source). A problem though is that dragging a waypoint causes your units to be deselected, so there's no visual confirmation of their path being changed until you reselect them. OTOH I think having to press shift before you can drag anything is preferable, so I'm not sure it should be specially supported.

Also, the bug I mentioned turned out to be something Spring-side todo with removing orders from idle factories, rather than with the Lua code. I've patched it, but until 0.75b3 is released factory waypoints can only be moved if the factory that owns them doesn't have an empty build-queue.

@Acidd

Yes, inserting new waypoints anywhere into the queue is now possible. Say you have a queue consisting of three points, A, B, and C. To stick a fourth waypoint in between A and B, hold down shift and alt together and drag A to where you want the new waypoint (this preserves everything after B).

@Tim

Also possible now. If you have multiple units selected, hold down shift and control together and move your mouse along all the waypoints you want to merge, then drag one of them (with control still pressed) to the merge-point. You can also use this to merge waypoints owned by a single selected unit; if it's following eg. A, B, C, D and you merge B and C into E, the new path will be A, E, D.

Anyway, new download link is in the first post.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Is there any significant performance/stability hit due to this widget?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

There might be some penalty if you have a lot (hundreds) of units selected while pressing shift, it has to iterate over all the waypoints of every unit in the selection and do a bit of math on the side for each. Stability should be fine.
User avatar
stilicho
Posts: 46
Joined: 21 Mar 2007, 02:49

Post by stilicho »

1v0ry_k1ng wrote:hold alt when you add somthing to a cue and it inserts in in the front in a factory. could insert the same thing for waypoints maybe?
Ray's Insert Commands widget does that.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

stilicho wrote:Ray's Insert Commands widget does that.
Does that still work with the new version?
User avatar
stilicho
Posts: 46
Joined: 21 Mar 2007, 02:49

Post by stilicho »

It still works.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Waypoint Dragging Widget

Post by Gota »

CAn someone reuplaod this please.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Waypoint Dragging Widget

Post by aegis »

http://www.evolutionrts.info/ufmirror/filelist.html

edit: you must look at the link and manually download + rename the file from http://evolutionrts.info/ufmirror/spring/ until lurker uploads a download.php file
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Waypoint Dragging Widget

Post by Gota »

Is it a widget or a gadget?
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Waypoint Dragging Widget

Post by Gota »

It appears ot be not even half finished unfortunatly.
It only support move orders.
It needs to support all orders including guard orders build orders reclaim circles capture restore transport load and unload etc..
Also when you click a point to drag it a different icon should appear and the white selection menu that normally appears when you press and drag with the left mouse button should not appear.
reivanen
Posts: 180
Joined: 12 Feb 2008, 15:52

Re: Waypoint Dragging Widget

Post by reivanen »

Is someone working on this?

It would be really nice if you could see all queues by pressing shift while having no units selected, then being able to modify the queuepoints by dragging them, and the modified queues would apply to all units having them in their command queue.

And another nice feature would be a double-right-click on a unit to copy its queue, contrary to normal right-click that assigns the unit a guard command (this one would be trivial to implement, i guess?)
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Waypoint Dragging Widget

Post by Gota »

Doubt anyone is..
If moving commands was possible supcom style this would be an awesome widget.
But it has to come with a widget that makes severla units share the same command line.
so if u select 5 air units and tell them to move to x there will only be 1 mutual move line for the entire group just like in supcom.
Post Reply

Return to “Lua Scripts”