Easy Facing

Easy Facing

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

Moderator: Moderators

User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Easy Facing

Post by very_bad_soldier »

Lets you rotate buildings with mouse and shows current facing by a big green arrow.
  • Hold left mouse button and move mouse in the direction you want to face the building
  • If you are placing a factory, it shows a green arrow representing the buildings facing
  • To rotate buildings without actually placing them (for queuing or building rows with Shift for example) press META-key (Space)
Updates in 1.3:
-you can now rotate building by pressing META (Space) before placing/clicking
-bugfix: wrong arrow size
-bugfix: wrong arrow position


Updates in 1.2:
-bugfix: shifting arrow bug when building rows

Updates in 1.1 (by Pako):
-you can move the mouse in the direction you want to face the building
-you can use it even when building rows with shift (press META then)
-the arrow gets scaled to better fit the current building
-set drawForAll to "true" if you want the green arrow for all buildings (not just factories)

Thanks to the #lua-guys as always ;)

Download via SpringDownloader or at http://www.springinfo.info/index.php?page_id=690#138
Attachments
screen005.jpg
screenie
(61.9 KiB) Downloaded 91 times
Last edited by very_bad_soldier on 27 Aug 2009, 23:56, edited 4 times in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Easy Facing

Post by Argh »

Yay! I'll take a look at this.
SkyStar
Engines Of War Developer
Posts: 23
Joined: 08 Jul 2009, 15:05

Re: Easy Facing

Post by SkyStar »

Nice, this makes me wonder where you guys get your ideas :)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Easy Facing

Post by hoijui »

nice one! :-)
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Easy Facing

Post by REVENGE »

Did I mention that you're one of my favorite widget writers? :P
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Easy Facing

Post by manolo_ »

nice
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Easy Facing

Post by Pendrokar »

SkyStar wrote:Nice, this makes me wonder where you guys get your ideas :)
Probably Emperor:Battle For Dune or Black & White?
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Easy Facing

Post by SinbadEV »

Black & White's "Spin the building until you click" thing was weird and kinda cool...

All in all, black and white was an awesome game if you just took out the "morality" thing and the Avatar/Pet

Oh, man, I wonder how close we could get to duplicating the other awesome parts without getting sued?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Easy Facing

Post by Niobium »

If you changed it to face to where your mouse is relative to the building, that would be perfect, and faster to get to the direction you want (Only 1 move)
Pako
Posts: 174
Joined: 12 Jul 2009, 18:57

Re: Easy Facing

Post by Pako »

This widget is most needed when making a build queue because the rotate key is too far from the left shift, but that wasnt working so I improved the widget.
Attachments
gui_easyFacing.lua
(7.24 KiB) Downloaded 149 times
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Easy Facing

Post by Jazcash »

YES! I've been waiting for exactly this for ages having written a few topics requesting it over the years :D

MANY THANKINGLINESS TO YOU AND YOUR FAMILY VBS <3
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Easy Facing

Post by Pendrokar »

JAZCASH wrote:YES! I've been waiting for exactly this for ages having written a few topics requesting it over the years :D
Search->name:"facing"->author:JAZCASH->LUA, Feature forums

No really suitable matches were found.

[edit]
If you changed it to face to where your mouse is relative to the building, that would be perfect, and faster to get to the direction you want (Only 1 move)
Ah so it's not like Emperor: Battle For Dune :?
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Easy Facing

Post by Jazcash »

Pendrokar wrote:
JAZCASH wrote:YES! I've been waiting for exactly this for ages having written a few topics requesting it over the years :D
Search->name:"facing"->author:JAZCASH->LUA, Feature forums

No really suitable matches were found.
http://springrts.com/phpbb/viewtopic.php?f=21&t=18743

Do not question my supremacy.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Easy Facing

Post by manolo_ »

pako whats the difference between urs and vbss widget?
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Easy Facing

Post by very_bad_soldier »

Thanks for all the nice comments ;)

@Pako: I like nearly all your chances. I hope you don't mind if I put them in the "official" version too (I just put drawForAll to "false" as default). Thanks!

@Niobium: Yes, thats better. Pako already changed it.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Easy Facing

Post by Pendrokar »

JAZCASH wrote:
Pendrokar wrote:
JAZCASH wrote:written a few topics requesting it over the years :D
Search->name:"facing"->author:JAZCASH->LUA, Feature forums

No really suitable matches were found.
http://springrts.com/phpbb/viewtopic.php?f=21&t=18743

Do not question my supremacy.
I forgot how a few looks like... :P
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Easy Facing

Post by Jazcash »

Pendrokar wrote: I forgot how a few looks like... :P
I COULDN'T BE BOTHERED TO GO DIGGING OKAY D:
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Easy Facing

Post by smoth »

may I have permission to include this in gundam?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Easy Facing

Post by Regret »

smoth wrote:may I have permission to include this in gundam?

Code: Select all

license   = "GNU GPL v2",
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Easy Facing

Post by smoth »

Regret wrote:

Code: Select all

license   = "GNU GPL v2",
Doesn't mean fuck all, just that if I modify it or use it with another widget I have to use a gpl compatible license. That means my PD lua scripts are fien :P.
Post Reply

Return to “Lua Scripts”