Modified unit_stockpile.lua

Modified unit_stockpile.lua

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

Moderator: Moderators

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Modified unit_stockpile.lua

Post by TheFatController »

Just throwing this out here

http://pw3n.net/widgets/unit_stockpile.lua

This widget not only stockpiles nukes but prepares them for instant fire by starting their firing script then stopping it.

The only issue is that it doesn't work on the core tactical nuke, even though you can do this manually... if anyone has any ideas on this please let me know.
Masure
Posts: 581
Joined: 30 Jan 2007, 15:23

Re: Modified unit_stockpile.lua

Post by Masure »

TheFatController wrote:...
This widget not only stockpiles nukes but prepares them for instant fire by starting their firing script then stopping it.

...
Nice trick :)
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Modified unit_stockpile.lua

Post by CarRepairer »

Spring.GiveOrderToUnit(unitID, CMD.ATTACK, {Spring.GetUnitPosition(unitID)}, {})

:lol:

Because I'm such a good friend I will point out that if LuaUI crashes you will nuke yourself. Once for every silo.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Modified unit_stockpile.lua

Post by TheFatController »

Couldn't think of a better place to aim them! :-P
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Modified unit_stockpile.lua

Post by jK »

map center?
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Modified unit_stockpile.lua

Post by TheFatController »

I'd rather nuke myself if lua crashed than my ally or front line (also middle of the map could theoretically be out of range from some nukes), tho the window for it happening is very small anyway and I almost never get luaui crashes myself :p

I'm more concerned about why it doesnt work at all for the cortron.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Modified unit_stockpile.lua

Post by AF »

Couldnt you aim outside the map or really high up?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Modified unit_stockpile.lua

Post by lurker »

Aim high!? You can't aim high in spring!

I need to go change that into a mod option / make it optional per weapon. It's nothing more than a hack. Fix the rockos, don't force aiming restrictions.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Modified unit_stockpile.lua

Post by AF »

I mean give the attack order an absurdly high height.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Modified unit_stockpile.lua

Post by lurker »

That's what I mean. You cannot give an attack order more than 8 elmos off the ground. Not without a helper gadget at any rate.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Modified unit_stockpile.lua

Post by CarRepairer »

It's still a nuke. Even if you could aim it up, it would fly through that spot and land on the ground.
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

Re: Modified unit_stockpile.lua

Post by Tribulexrenamed »

Aim it at the opposite position on the map.
So if you are in the middle it aims at itself, or if you are at the NE corner it aims at SW corner. Dunno, this widget just makes me nervous...
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Modified unit_stockpile.lua

Post by TheFatController »

What if you were doing this trick without a widget and your cat kicked your keyboard lead out before you could hit 's'
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Modified unit_stockpile.lua

Post by lurker »

TheFatController wrote:What if you were doing this trick without a widget
It would be aimed at the enemy base.
User avatar
Tribulexrenamed
Posts: 775
Joined: 22 Apr 2008, 19:06

Re: Modified unit_stockpile.lua

Post by Tribulexrenamed »

TheFatController wrote:What if you were doing this trick without a widget and your cat kicked your keyboard lead out before you could hit 's'
It would be aimed at my cat.
Post Reply

Return to “Lua Scripts”