Easy mouse targeting widget

Easy mouse targeting widget

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

Moderator: Moderators

Post Reply
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Easy mouse targeting widget

Post by Godde »

This widget makes it easier to target a single stationary or moving unit with Attack, Reclaim, Capture, Repair and Load commands.

It overrides the default area commands when the mouse cursor is on top of the same unit during both mouse button press and mouse button release.

Flying units in particular are hard to target with the default area commands. Trying to repair a gunship is a particularly frustrating as any movement of the mouse will result in an area command which by default will be a ground level sphere which most likely will be out of range of the intended target.

There might be some conflicts with other widgets. So feel free to tell me any about any bugs and feel free to review the code. :)
Attachments
cmd_easy_mouse_targeting.lua
(3.46 KiB) Downloaded 22 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Easy mouse targeting widget

Post by PicassoCT »

Godde Industries presents .. pure win :)

But wait.. if the players start to fix the stuff- why did we bother bughunting in the first place.?
Godde
Posts: 268
Joined: 29 Mar 2010, 17:54

Re: Easy mouse targeting widget

Post by Godde »

Well this isn't bug hunting per se. In my humble opinion it is an improvement over the default mouse behavior however.
For discussion see topic Targeting, precision and ambiguity when using the mouse.
Post Reply

Return to “Lua Scripts”