Page 1 of 1

Modified unit_stockpile.lua

Posted: 06 Nov 2008, 10:24
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.

Re: Modified unit_stockpile.lua

Posted: 06 Nov 2008, 11:16
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 :)

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 01:47
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.

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 09:30
by TheFatController
Couldn't think of a better place to aim them! :-P

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 10:49
by jK
map center?

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 11:45
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.

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 16:11
by AF
Couldnt you aim outside the map or really high up?

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 16:24
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.

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 22:35
by AF
I mean give the attack order an absurdly high height.

Re: Modified unit_stockpile.lua

Posted: 07 Nov 2008, 22:44
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.

Re: Modified unit_stockpile.lua

Posted: 08 Nov 2008, 18:20
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.

Re: Modified unit_stockpile.lua

Posted: 09 Nov 2008, 15:46
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...

Re: Modified unit_stockpile.lua

Posted: 09 Nov 2008, 16:35
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'

Re: Modified unit_stockpile.lua

Posted: 09 Nov 2008, 17:12
by lurker
TheFatController wrote:What if you were doing this trick without a widget
It would be aimed at the enemy base.

Re: Modified unit_stockpile.lua

Posted: 10 Nov 2008, 06:15
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.