My stupid widget doesn't work: Bawww

My stupid widget doesn't work: Bawww

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

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

My stupid widget doesn't work: Bawww

Post by Forboding Angel »

http://pastebin.com/2PWUEGam

The entire point of this widget is to allow you to define specific units that will get a fight order right after being built (or while being built, doesn't matter).

The reason for this is because when you create mobile units with a mobile builder, unitIdle is never called, and so if you are using things like the builder auto assist widgets, your mobile nanoturrets will never work, because spring doesn't even see them.

However, if you give the unit you are building any order, like stop, move, fight, etc either while it's building or after it is finished, it will call unitIdle normally and function properly.

This widget is an attempt to fix that issue. It's a bit hamfisted, but it doesn't look like unitIdle is getting fixed any time soon, so "LUA ALL THE THINGS".

Problem is, it doesn't work. I think I am using return in an illegal way. Halp plox.
sprunk
Posts: 101
Joined: 29 Jun 2015, 07:36

Re: My stupid widget doesn't work: Bawww

Post by sprunk »

L33

Code: Select all

return ud and ud.unitName == "eorb"
:arrow:

Code: Select all

return ud and ud.name == "eorb"
Edit: oops old thread, probably already solved
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: My stupid widget doesn't work: Bawww

Post by Forboding Angel »

Thanks sprunk, yeah I did fix it, but I forgot to update this thread. :-D

Edit: I've been using it locally for a while now, but I decided to just go ahead and add it to Evo now that you reminded me that I'm the only one that has it lol

In case anyone wants it:
https://github.com/EvolutionRTS/Evoluti ... ommand.lua
Post Reply

Return to “Lua Scripts”